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 Interactive JavaScript Charts With Highcharts
Viewed 1241 times since Fri, Dec 4, 2009
Use PHP Functions In JavaScript with PHP.JS Library
Viewed 928 times since Fri, Jan 8, 2010
Web Form Elements in PSD Format
Viewed 1026 times since Sun, Dec 27, 2009
Google Web Toolkit - Version 2 Released
Viewed 1034 times since Tue, Dec 15, 2009
13 Useful Javascript Syntax Highlighting Scripts
Viewed 1361 times since Mon, Jan 4, 2010
imgAreaSelect - jQuery Plugin To Select Areas On Images
Viewed 1353 times since Thu, Dec 31, 2009
ICEpdf - Open Source Java PDF Library
Viewed 1276 times since Wed, Jan 6, 2010
Stylish Cross-Browser CSS Buttons - Simply-Buttons v2
Viewed 1037 times since Thu, Nov 12, 2009
Facebook Style Chat Script - ArrowChat
Viewed 1095 times since Tue, Aug 3, 2010
MENU