Article Diary - General Knowledge Digest

How can I change session timeout value?

Check the following values in your php settings.

  1. session.cookie_lifetime
    - session.cookie_lifetime specifies the lifetime of the cookie in seconds which is sent to the browser.
    - a value of 0 means "until the browser is closed"
  2. session.gc_maxlifetime
    - session.gc_maxlifetime specifies the number of seconds after which data will be seen as ’garbage’ and cleaned up.
    - garbage collection occurs during session start.

Try to set session.gc_maxlifetime to 7200. You must restart your server for this to take effect.

Attached Files
There are no attachments for this article.
Comments (1)
Comment by James on Tue, Apr 27th, 2010 at 3:38 PM
Thanks for the information. I was desperately looking for the variables that control session expiry i.e. session timeout value in php.ini file.
Name
Email
Security Code Security Code
Related Articles RSS Feed
jQuery Slider from a Select Element
Viewed 2185 times since Thu, Jan 14, 2010
45 jQuery Navigation Plugins and Tutorials
Viewed 2111 times since Thu, Jan 28, 2010
CSS Positioning - Absolute, Relative & Fixed
Viewed 1174 times since Thu, Dec 3, 2009
10 Most Popular JavaScript Frameworks
Viewed 890 times since Thu, Jul 8, 2010
Protovis - Visualization for JavaScript via Canvas
Viewed 887 times since Sun, Jan 3, 2010
Web Application Security Tools & Scanner Applications
Viewed 1238 times since Mon, Mar 22, 2010
Open Source Online Invoice System - siwapp
Viewed 1166 times since Thu, Jan 7, 2010
5 Best Online Diagram Designing Tools
Viewed 7803 times since Sat, Jan 30, 2010
MENU