make session expire

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
nn [ So, 18 November 2007 01:41 ] [ ID #1873636 ]

Re: make session expire

On Sat, 17 Nov 2007 18:41:06 -0600, NN <NoName [at] home.com> 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
nn [ So, 18 November 2007 03:37 ] [ ID #1873637 ]
PHP » alt.php » make session expire

Vorheriges Thema: Spam? I hope not
Nächstes Thema: Newbe Question