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
Plupload - Multiple Files Upload Script
Viewed 1040 times since Tue, Feb 9, 2010
dygraphs JS Charts - Free JavaScript Charts
Viewed 757 times since Sun, Dec 13, 2009
10 Most Popular JavaScript Frameworks
Viewed 781 times since Thu, Jul 8, 2010
Create Navigation Menu Easily with jQuery Menu
Viewed 849 times since Thu, Dec 31, 2009
5 Best Online Diagram Designing Tools
Viewed 7590 times since Sat, Jan 30, 2010
Tiny Flash MP3 Audio Player
Viewed 772 times since Wed, Jan 6, 2010
dTree - Flexible JavaScript Tree Menu
Viewed 1204 times since Thu, Jan 14, 2010
ZeusCart | Feature Rich Open Source E-Commerce System
Viewed 1122 times since Thu, Jul 15, 2010
How to redirect an old domain to a new domain using htaccess?
Viewed 667 times since Sun, Mar 14, 2010
Create Glowing, Radioactive Buttons with CSS
Viewed 767 times since Sun, Dec 27, 2009
MENU