Session Timout Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • seigan
    New Member
    • Oct 2006
    • 2

    Session Timout Help

    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("sessio n.gc_maxlifetim e"); it says 1440 and if I change it to 1 with ini_set("sessio n.gc_maxlifetim e", "1"); the chenge is noticed but the session still exists!!! What have I done wrong?

    The function looks like this:
    function session_start_m anager()
    {
    ini_set("sessio n.gc_probabilit y", "1");
    ini_set("sessio n.gc_divisor", "2");
    ini_set("sessio n.gc_maxlifetim e", "1");
    session_start() ;
    //print ini_get("sessio n.gc_maxlifetim e").'<br>';
    }

    Thanks
    //A
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Are you using COOKIES to store your SESSION? If so, you will want to set your session.cookie_ lifetime to an appropriate value.

    Comment

    Working...