Re: sessions and sessionfiles

From: Date: Wed, 22 Aug 2001 19:40:32 +0000
Subject: Re: sessions and sessionfiles
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63959@lists.php.net to get a copy of this message
in the php.ini you can set the garbbage collection higher than 1 but that puts a bigger load on your computer... what garbage collection does is that it goes through and deletes all the session files that have expired due to the setting of the session.gc_maxlifetime.. so right now with the way you have things set up is that 1 out of every 100 session requests php will go though the session files and find the ones that are older than 1440 seconds and delete them... if you set 1 to 100 then every time a session request is made php will go and find all the files that are over 1440 seconds and delete them.. as you can see that would be a huge load on your computer... :) hope that helps! jay "Danny" <dankolk@multiweb.nl> wrote in message news:20010822193701.30709.qmail@pb1.pair.com... > Hi there, > > well...I'm tired of searching so I'll drop a note here. > I've been busy working with php (4.0.6) sessions lately for an online > shopping cart, which works really great. > Only problem is, the temporary session-files are not removed after a certain > timeout occurs. > The "session.gc_maxlifetime"-variable is set to 1440 seconds, which means > the temporary session-files should be deleted after 24 minutes of inactivity > from the client side. Unfortunately, nothing of a kind happens. > A way around this problem is adding a cronjob which deletes session-files > older than say 3 or 4 hours or so. > I'd rather see a better solution...anyone? > And is there any information available on wether or not the error of not > deleting session-files has any consequences for newly created sessions? > > Anyone out there, if you have a serious and professional solution, please > mail to dankolk@multiweb.nl. > Thanks! > > Happy php-ing! Danny. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#63959) next »