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
What is new in HTML 5?
Viewed 1362 times since Sat, Apr 3, 2010
Coming Soon Template
Viewed 1342 times since Thu, Nov 12, 2009
10 Most Popular JavaScript Frameworks
Viewed 1484 times since Thu, Jul 8, 2010
Google Maps jQuery Plugin - gMap
Viewed 1668 times since Mon, Feb 8, 2010
PHP Questions for Interview with Answers
Viewed 1748 times since Wed, Feb 24, 2010
How do I add and register extra domain names?
Viewed 4115 times since Fri, Oct 9, 2009
Open Source Trouble Ticket System - Jutda Helpdesk
Viewed 2571 times since Sat, Jan 9, 2010
Quick Tables for Showing & Updating DB Data
Viewed 1418 times since Sun, Dec 27, 2009
IE6 CSS Fixer - Web-Based IE6 CSS Fix Tool
Viewed 1292 times since Thu, Dec 31, 2009
MENU