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
Create Navigation Menu Easily with jQuery Menu
Viewed 744 times since Thu, Dec 31, 2009
AeroSQL - Web Based MySQL Management
Viewed 743 times since Wed, Feb 24, 2010
What is Search Engine Optimization?
Viewed 973 times since Fri, Jun 25, 2010
SlideDeck - Cool jQuery Slideshow Plugin
Viewed 755 times since Thu, Feb 4, 2010
Free JavaScript Date Picker - jsDatePick
Viewed 928 times since Fri, Apr 9, 2010
imgAreaSelect - jQuery Plugin To Select Areas On Images
Viewed 977 times since Thu, Dec 31, 2009
Meerkat - jQuery Plugin for Promotional Content
Viewed 629 times since Tue, Dec 29, 2009
Web Application Security Tools & Scanner Applications
Viewed 982 times since Mon, Mar 22, 2010
How to redirect an old domain to a new domain using htaccess?
Viewed 573 times since Sun, Mar 14, 2010
MENU