Increase Default Session Timeout Time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vijaytambade
    New Member
    • Jun 2015
    • 1

    Increase Default Session Timeout Time

    I want to sent my default session timeout time for a one year.
    For that i followed method 1 from article

    http://bytes.com/topic/php/insights/889606-setting-timeout-php-sessions


    But there they mentioned that destroy and restart the seesion.
    What i have to do if i want to keep alive my session for one year.

    Thank you in advance.
  • computerfox
    Contributor
    • Mar 2010
    • 276

    #2
    Can't do it, especially with sessions as they are temporary.
    Try doing setcookie('name ','value',date( "Y")+1)

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      I want to sent my default session timeout time for a one year.
      that doesn’t make sense. if you want to allow you users to be logged in that long, use the "remember me" feature (essentially, a cookie that tells your system to bypass the login and treat the user as logged in re-building the necessary session data)

      Comment

      Working...