O
15

Tried building a login form with PHP sessions and kept getting logged out after 5 minutes.

Turns out my hosting server's session timeout was set to 5 minutes by default, took me 3 hours to find that in the php.ini file - has anyone else run into hidden server settings like this?
3 comments

Log in to join the discussion

Log In
3 Comments
hugo_schmidt
Check your php.ini for session.gc_maxlifetime, not just the timeout settings.
6
stella_murray
Exactly, @hugo_schmidt has been super helpful on this. Really appreciate people taking the time to share the deeper fixes like that. My session problems turned out to be that setting all along.
2
the_jenny
the_jenny1mo agoMost Upvoted
And my friend spent weeks on that same issue before someone finally pointed out the php.ini setting to him.
5