Re: Assist with session persistance

From: Date: Tue, 23 Dec 2003 17:10:20 +0000
Subject: Re: Assist with session persistance
Groups: php.general 
Request: Send a blank email to php-general+get-173258@lists.php.net to get a copy of this message
[snip] ex: display.php session_start(); $agencyID=$_SESSION['agencyID']; $agencyName=$_SESSION['agencyName']; But after awhile, the session seems to fail and I end up back at the index page because the $agencyID gets voided. Is there a timeout on sessions other than closing the browser? If so, is there a way to set timeout if one doesn't have server admin access? Should I be doing something like: [/snip] There is a session timeout. http://ch.php.net/session take a look at the variable session.gc_maxlifetime . I am not sure how to change this if you dont have admin access. You could store the session info in a db and right your own clean up routines. I think you can skip this: $agencyID=9; $agencyName="fremont"; and just do this: $_SESSION['agencyID'] = 9; $_SESSION['agencyName'] = "fremont"; then just use the $_SESSION vars in your scripts.

« previous php.general (#173258) next »