after 1.5 years someone posted this, i am facing exactly the same problem. if i set session.gc_probability to 100% and my session files to 10 minutes, they get deleted everytime new session starts. this is not okay and if there is timeout of 10 minutes, session files should not be touched at all. can authors of php explain why does this happen?
here is that old posting no one has replied to.
---->8---- SNIP --------
When does the garbage men come to clean this mess up?
Im specifically speaking of session data files. I have found that setting the gc_probability setting in php.ini to '90' (percent), that everytime a new session starts it nukes the last session variable no matter WHO has it or what the session timeout variable (gc_maxlifetime) is set to.
So, when is this method going to be replaced with something cleaner?
I dont like seeing OLD session data files laying around and with a probability of 1% they may get cleaned up..(its default is 1)? Who thought this up. Sheesh. I would like PHP to always read the maxlifetime of the session from php.ini (but i would also like to set the timeout in the source php file itself).
Regardless, if a gc_maxlifetime is set for 5 mins, then and only then should it be tagged to be cleaned. Unfortunatly, this is not the case. I dont care if the gc_probability is set to 200%, if the lifetime of the session is not up, it SHOULDNT get NUKED!
Comments/Questions?
-Buzzlightyear
To Infinity and Beyond!