Do sessions have an auto time out and if so what is it??

Discussion in 'PHP' started by liam1412, Aug 9, 2007.

  1. #1
    As above really.

    I wondered if somebody left there screen for an hour and cookies wasn't set would they have to login again.

    Thanks
     
    liam1412, Aug 9, 2007 IP
  2. Chemo

    Chemo Peon

    Messages:
    146
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The default session TTL is 24 minutes...so if there is no activity in that time the sever side session would (*should*) be removed.

    Bobby
     
    Chemo, Aug 9, 2007 IP
  3. liam1412

    liam1412 Active Member

    Messages:
    387
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Cheers for that mate. Is there any way to access the time out from a script. Ie terminate after 3mins etc as I don't have that kind of access to my php ini file through my host.

    Thanks
     
    liam1412, Aug 9, 2007 IP
  4. exodus

    exodus Well-Known Member

    Messages:
    1,900
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    165
    #4
    You could handle the removing of the sessions yourself.

    http://us.php.net/session_save_path

    Or you can try to change it during scripts run time.
    ini_set("session.gc_maxlifetime","");
     
    exodus, Aug 10, 2007 IP