Posted by Peter van Schie on 10/25/73 11:57
bizt wrote:
> Im finding that the session variable expires maybe after about 30
> minutes (I havent timed it exactly).
The default value is actually 24 minutes (1440 seconds).
> Is it possible to set the session variables to expire when the user
> shuts down their browser and not after a certain time (eg. 30 minutes)?
> How is this done? Do I define this in my PHP script or should I request
> this from my hosting company?
It is determined by the session.gc_maxlifetime setting in php.ini.
As far as I know you can also set it from your scripts using ini_set:
ini_set('session.gc_maxlifetime', 3600); // set timeout to an hour
HTH.
Peter.
--
http://www.phpforums.nl
Navigation:
[Reply to this message]
|