make session expire

make session expire

am 18.11.2007 01:41:06 von nn

a simple php login.
it uses php/mysql and user session. the problem i'm ecountering is
that the sessions don't expire until you log out.

how can i make the sessions expire in let's say 1 hour when there is
no activity on the webpage?

thank you,
GD

Re: make session expire

am 18.11.2007 03:37:08 von nn

On Sat, 17 Nov 2007 18:41:06 -0600, NN wrote:

>a simple php login.
>it uses php/mysql and user session. the problem i'm ecountering is
>that the sessions don't expire until you log out.
>
>how can i make the sessions expire in let's say 1 hour when there is
>no activity on the webpage?
>
>thank you,
>GD

BTW i've been trying to use:
ini_set("session.gc_maxlifetime", "5");
to make the session expire in 5 secs. and i read in the page that in
fact the session should expire in 5 secs with:

echo ini_get("session.gc_maxlifetime");

but nothing happens, i reload the page in 10 secs and i'm still logged
in.

i've tried both:
session_start();
ini_set("session.gc_maxlifetime", "5");

and
ini_set("session.gc_maxlifetime", "5");
session_start();

thanks,
GD