create new account | forgot password


posted by dennisn on October 23rd, 2008 at 9:55AM

Hrm. This morning I got logged out, both from this site, and from my testing (single-user) site. But the same cookie is still there. So, somehow, the $_SESSION['uid'] variable got deleted.

There is an option in php.ini to control the (garbage collector's) maxlifetime of session variables, but it's set to 1440s (24min), so it can't be that, since if it were, I'd have been logged out every morning.

Ideas?
Link | Parent


 
 

posted by dennisn on October 23rd, 2008 at 10:45AM

Ok. I /think/ I fixed it. The problem does indeed seem to be with the garbage collector. The default configuration is to "mark" all session data over 24 minutes old as garbage, and then there is a default probability of 1% that it will get deleted "some time" after this period.

I changed the session data maxlifetime to over a year, roughly the age of the cookie, and had to restart apache, so all your sessions got deleted :)--you'll have to log in again :|... hopefully for the last time.