Re: session timeout

From: Date: Mon, 04 Oct 2004 15:25:37 +0000
Subject: Re: session timeout
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198592@lists.php.net to get a copy of this message
On Mon, 04 Oct 2004 09:54:15 -0500, Philip Thompson <prthomp@uark.edu> wrote: > I have users log into my site to perform certain actions. However, I > want to create a timed session so that it automatically logs them out > after a certain amount of time. I am using > session_set_cookie_params() to create the amount of available > time > that the user is logged in. session.gc_maxlifetime sets the session lifetime. > But my question is: how do I test to see if the session has timed out? if(isset($_SESSION['some_session_var'])) > Once the session time has elapsed, are the $_SESSION variables > automatically destroyed or what? Session garbage collection occurs occasionally when session_start() is called. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/

« previous php.general (#198592) next »