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

umefarooq's avatar

Laravel 5.3 not saving session on my production server

Hi, im trying to login using laravel auth but its not saving session and always redirected to login page, not any login any kind of session is not working anybody can help me what im doing wrong for laravel session, on my local machine project works fine

0 likes
4 replies
umefarooq's avatar

@bobbybouwmann its just fresh install, i am using session driver as database this problem drive me crazy, i think because of this session problem i am also getting CSRF token mismatch exception right now i have disabled VerifyCsrfToken middleware

bobbybouwmann's avatar

You must have done something wrong here.. Is the storage directory writable?

Anishdhanka's avatar

I have also faced the same issue. it took me several days to debug the problem . so its output buffer limit issue in php.ini. technically PHP sends output as bytes which missing Set-cookie header in the request due to limit. I updated output_buffering = 16384 in php.ini which worked for me.

Please or to participate in this conversation.