469,641 Members | 1,116 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

Session Timout Help

2
Hi all,
I'm kind of new here and I realy need your help guys.
I have done an basic php login script with sesions that will expire after default time. The thing is that it dosen't work at all. If you login the session nevere expire. If I check the time with print ini_get("session.gc_maxlifetime"); it says 1440 and if I change it to 1 with ini_set("session.gc_maxlifetime", "1"); the chenge is noticed but the session still exists!!! What have I done wrong?

The function looks like this:
function session_start_manager()
{
ini_set("session.gc_probability", "1");
ini_set("session.gc_divisor", "2");
ini_set("session.gc_maxlifetime", "1");
session_start();
//print ini_get("session.gc_maxlifetime").'<br>';
}

Thanks
//A
Apr 18 '07 #1
1 1441
Motoma
3,237 Expert 2GB
Are you using COOKIES to store your SESSION? If so, you will want to set your session.cookie_lifetime to an appropriate value.
Apr 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Nedu N | last post: by
1 post views Thread by Jennifer | last post: by
8 posts views Thread by bdeviled | last post: by
18 posts views Thread by Rippo | last post: by
2 posts views Thread by LiliA | last post: by
1 post views Thread by bhasky | last post: by
14 posts views Thread by GaryDean | last post: by
2 posts views Thread by =?Utf-8?B?bWF2cmlja18xMDE=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.