Garbage collection is launched according to the gc_probablility. If it finds
a session file that has not been modified for a longer time than
gc_maxlifetime, it deletes it. So, whenever a user requests a page, they
essentially reset the session timer to zero for that particular session,
since the session file gets modified on each page request for that session.
If you want to set a hard timeout of 20 minutes, you may need to write your
own garbage collection process.
Kirk
-Original Message-
From: Phil Powell [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 1:02 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How long does a session last? Need to have it at 20mins
I had thought that a session would last only 20 mins if
session.gc_maxlifetime is set at 1440. Was I wrong in
assuming this? I
have pages that have session_start() at the top to persist the session
throughout the life-cycle of these pages, however, I want the
session to
expire after 20 mins or so of use. How can I assure that the
session will
expire after 20 mins?
Thanx
Phil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php