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.

5 (1)
Article Rating (1 Votes)
Rate this article
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
How do I add and register extra domain names?
Viewed 4025 times since Fri, Oct 9, 2009
SEO Poisoning - What are SEO Poisoning Attacks?
Viewed 1609 times since Mon, Apr 5, 2010
tgrdfgdgfdg
Viewed 1190 times since Sun, Jan 17, 2010
Free 3D Flash Image Slider - Piecemaker
Viewed 2215 times since Sun, Apr 4, 2010
Search Engine Optimization: Tags of Importance for SEO
Viewed 1196 times since Tue, Oct 12, 2010
What is new in HTML 5?
Viewed 1308 times since Sat, Apr 3, 2010
Web Usability Testing Tool - Clixpy
Viewed 1713 times since Sat, Jan 9, 2010
What is rel="nofollow" attribute?
Viewed 1021 times since Thu, May 13, 2010
How to restrict access to your .htaccess file?
Viewed 1177 times since Sun, Mar 14, 2010
Web Application Security Tools & Scanner Applications
Viewed 1611 times since Mon, Mar 22, 2010