Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

adito99's avatar

Empty _flash session on welcome(login) page of shared hosting

i just found that my sessions are empty on my web host on my localhost i get this

and on my web host this

  • {"_token":"1uzxzEnRBMPQpTGlmhieXlg1pOzALJ5XhUYHVk42"}

And i dont know how to solve it any ideas

0 likes
4 replies
bobbybouwmann's avatar

What session driver are you using? Maybe you don't have permissions for the file or one of the third party drivers. You could try to use the array or database driver

1 like
adito99's avatar

my session driver is set to file

'driver' => env('SESSION_DRIVER', 'file'),

bobbybouwmann's avatar

Maybe you don't have the correct permissions for the files. Have you tried another driver for the sessions?

adito99's avatar
adito99
OP
Best Answer
Level 1

I found the problem in my web.php file I had one empty row before the opening <?php tag . I delete it and now everythig works fine. Thanks for the help.

Please or to participate in this conversation.