What is the expire time period of PHP session

Discussion in 'PHP' started by sparkar17, Mar 23, 2010.

  1. #1
    What is the expire time period of PHP session....
     
    sparkar17, Mar 23, 2010 IP
  2. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #2
    Depends what's set in php.ini. I think it's something like session.gc_maxlifetime?
     
    mfscripts, Mar 23, 2010 IP
  3. Xuhybrid

    Xuhybrid Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    $garbage_timeout = 3600; // 3600 seconds = 60 minutes = 1 hour
    ini_set('session.gc_maxlifetime', $garbage_timeout);
    Code (markup):
     
    Xuhybrid, Mar 23, 2010 IP
  4. guardian999

    guardian999 Well-Known Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    
    $garbage_timeout = 3600*24; // 24 hours :o
    ini_set('session.gc_maxlifetime', $garbage_timeout);
    
    Code (markup):
     
    guardian999, Mar 23, 2010 IP