Re: [PHP3] Deleting sessions

From: Date: Thu, 22 Jun 2000 03:51:49 +0000
Subject: Re: [PHP3] Deleting sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-2575@lists.php.net to get a copy of this message
In article <394B06AB.87CD7324@sfu.ca>, gpalmer@sfu.ca (glenn) wrote: > I'm using php3 and had to hand code the session support, so this may not > apply. Anyway, this is how I handled it. > Session id are stored in a db table. One of the values is a time of > access. > Everytime someone does something on the site this time variable is > updated. > The file which is included to handle sessions always reads the session > table first and deletes any entries which are more than 30 minutes old > before doing anything else. > Once the table has been cleaned, either a new session is created or an > existing one gets its time value updated. > > This is a fast, simple way to keep the session table reasonably clean. > Maybe php4 has a better way of handling this, but this way of doing > things has worked fine for us thus far. For PHP4, there is a session.time_limit (or something like that) in php.ini that's supposed to do that... I think some folks are having trouble with it, but I dunno if it's people not quite conversant with PHP4 sessions, or an actual bug... -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#2575) next »