Quote:
Originally Posted by kodemonki
reading that documentation, i found things such as setting a cookie or cache lifetime, but i didn't see anything on setting a session lifetime. i need to expire a session after 5 minutes then redirect to a login page. could i set a cookie expiration and then just check if the cookie is set? i would perfer to do it with session variables. does anyone know how?
Sessions are in fact just cookies that are stored on the server instead of the browser of the client viewing the page.
Adding ini_set('session.gc_maxlifetime', 7200); to the begining of a PHP script will set the session lifetime at the time the script is run (initialization set). You can also change this for the entire PHP server by editing the php.ini file on the servers end.
-Sys