Re: session timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 04 Oct 2004 09:54:15 -0500, Philip Thompson <prthomp@xxxxxxxx> 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/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux