By default, garbage collection isn't being run every time a page is
loaded (both default php.ini files set session.gc_probability to 1, or
1%.) so your files are possibly sticking around for longer than 2 hours
anyway.

gc_maxlifetime only defines where or not a session is still available
and whether or not to delete the session file *when* the cleanup
happens.  If the cleanup doesn't happen (that 1% doesn't come around for
4-5 hours), then files will still be there.

I'm not really sure how the base session garbage collection defines the
"last modified/used", but I would guess they're using the mtime on the
file itself.  Introducing more checks would probably slow down gc
considerably.  Especially if your running thousands of sessions at any
given period.

Jaime Bozza


-----Original Message-----
From: André Nęss [mailto:[EMAIL PROTECTED]] 
Sent: Friday, November 30, 2001 9:32 AM

Maybe I was unclear. The problem is that to allow for 2 hour timeouts I
need to have gc_maxlifetime set to 2 hours, but for 99,9% of all session
I don't need than 15 minutes gc_maxlifetime since they have a cookie
lifetime of 15 minutes.


--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to