|
Posted by Rik on 07/23/07 18:54
On Mon, 23 Jul 2007 20:47:31 +0200, Rogier <r.e.vanijperen@gmail.com> =
wrote:
> Hello,
>
> I made a simple script with some session variables. When I work in the=
> application, and when I don't use the application for some time, the
> session vars are erased... even when I set the session time out for 4
> hours....
>
> Here is a part of the code:
>
> <?PHP
> session_cache_expire(240);
> $cache_expire =3D session_cache_expire();
> session_start();
> include('functions.php');
> $naam_l =3D '';
RTFM:
session.cache_expire integer
session.cache_expire specifies time-to-live for cached session pages in =
=
minutes
session.gc_maxlifetime integer
session.gc_maxlifetime specifies the number of seconds after which data =
=
will be seen as 'garbage' and cleaned up. Garbage collection occurs duri=
ng =
session start
The 'cache expire' is for:"cache control method to use for session pages=
=
(none/nocache/private/private_no_expire/public)", NOT for timing out =
sessions.
So, set session.gc_maxlifetime to an appropriate value.
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|