Support the ongoing development of Laravel.io →
Authentication Requests Session
Last updated 1 month ago.
0

What is SESSION_DRIVER set to in your .env file and driver in sessions.php?

0

Prefer session driver as database currently you are using file.

0

I dont have .env file, in session.php, the driver that we use is file, but even if we change it too database, it wont help

0

Try Sentinal if you are using L 5.1 for better session management.

Last updated 6 years ago.
0

Finally after long debugging, we found that there was an Enter (Blank line) before <?php tag in app/config/app.php , that ruin everything. On the linux there is no problem at all (site works like a charm), but on Mac with server on MAMP and Denwer (Windows), the site gives us the blank answer because of this small Enter and the session is recreated everytime. I feel so stupid (((

If anyone else have the same problem , this might be the answer for you.

0

But how can i get if any blank lines or spaces in all these files is there any quick method to debug ?

0

Same problem here. Turned out I had a 'space' before <?php in my routes.php file. <duh>

0

dump() is what broke my session.

I was using it to send some visual output to the screen (I know I should have been using TDD) and this was causing my session to break.

0

ahmedsliman said:

But how can i get if any blank lines or spaces in all these files is there any quick method to debug ?

With Netbeans (and other IDES) you can make a search with this regex:

[\n]<.php

This works perfectly for me.

Last updated 5 years ago.
0

Sign in to participate in this thread!

Cloudways

Your banner here too?

rpg999 rpg999 rpg999 Joined 15 Jul 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.