Re: Is this the right way to increase the amount of time session variables are dropped
| From: | Torsten Roehr | Date: | Fri, 20 Aug 2004 19:13:40 +0000 |
| Subject: | Re: Is this the right way to increase the amount of time session variables are dropped | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194362@lists.php.net to get a copy of this message | ||
"Boot" <pfine@of-law.com> wrote in message
news:20040820184140.40878.qmail@pb1.pair.com...
> Currently session variables are dropped in a shorter time period than I
> would like when a user sits with a page open but idle.
>
> My PHP.INI has session_gc_maxlifetime set to 1440.
>
> If I want variables kept for two hours, is setting session_gc_maxlifetime
> the correct setting to change (to 7200) ?
>
>
> Thanks!
If you cannot edit your php.ini put this line at the top of all your
scripts:
ini_set('session.gc_maxlifetime', 7200);
You can also set this environment variable with a .htaccess file. Search the
archives to find out how the exact syntax is.
Regards, Torsten Roehr