News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

CentreSource Blog:
PHP Session Lifetime - an Adventure
May 24, 2006 @ 17:49:15

From the CentreBlog today, there's an in-depth look at sessions as discovered by resolving a problem of prematurely expiring sessions on their apps.

It started about two weeks ago, with no discernable changes to our configuration that could be responsible. So to understand what was necessary to track down this problem, we have to explore a little bit about how PHP session data storage and expiration works.

They share some of their discoveries, including:

  • the session.save_path setting in the php.ini tells the scripts where the sessions go
  • garbage collection in PHP checks for sessions older than the session.gc_maxlifetime setting to remove
  • but sessions were still expiring too early
They finally started to Google for some answers and discovered that the problem wasn't in the default PHP configuration, the real issue was other software that overrode this php.ini value inside each execution. The result was that a script with the setting of 45 minutes would remove all sessions untouched for more than 45 minutes - regardless if they belonged to other software or not.

0 comments voice your opinion now!
session lifetime problem expire timelimit php.ini session lifetime problem expire timelimit php.ini


blog comments powered by Disqus

Similar Posts

DZone.com: PHP Performance Crash Course, Part 2: The Deep Dive

VoucherTrader.co.uk Blog: A Further Problem With PHP Session IDs and Google

Brian Moon's Blog: PHP session cookie refresh

Zend Developer Zone: The ZendCon Sessions Ep 14: Performance Tuning for PHP with Oracle Database

Ibuildings techPortal: DPC09 Sessions - Internals & Embedded Devices


Community Events





Don't see your event here?
Let us know!


zendserver interview code tips podcast symfony list release language conference api introduction deployment laravel threedevsandamaybe series framework voicesoftheelephpant bugfix community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework