PHP 4.0 Bug #8501 Updated: session.gc.maxlifetime option dosen't work

From: Date: Wed, 03 Jan 2001 10:38:51 +0000
Subject: PHP 4.0 Bug #8501 Updated: session.gc.maxlifetime option dosen't work
Groups: php.dev 
Request: Send a blank email to php-dev+get-42789@lists.php.net to get a copy of this message
ID: 8501 User Update by: bignat@mail.com Status: Closed Bug Type: *Session related Description: session.gc.maxlifetime option dosen't work It just works perfectly! I've read the #3793 bug and feedbaks. I don't have now any error (reported by me or there with windows). The gc.max_lifetime works fine and does not remove any other session id. I cannot work with the session after the expire time. The fact that the gc is started only when a session is started, does not matter, because when someone tries to use it, it will be purged.. There is one thing I want to emphasize. I learned from mathematics that probabilities are from 0 to 1, that is, a probability of 1 means 100%. That was confusing me, belivieng that things go wrong, even there is mentioned something about percentage in the gc.probability option. I suggest you to put there (in the ini file) as default gc.probability=100 so that people could know the limits (or a note about limits, like 'max 100'). It can confuse many people who think like me, that 1 means 100%, when in fact means a very low prob to the gc to be started. I realise that it is a good choice to put a lower value in the gc.probability option, because in a production environment with many sessions at a time, the gc could annoy and decrease proceess velocity.. it is very well thought I think, but it should be better documented in the ini file, I repeat myself, just make known the limits of the gc.probability and in my opinion all will be much better. Thank you so much! Daniel BI Previous Comments: --------------------------------------------------------------------------- [2001-01-02 18:23:39] sniper@php.net Maybe this would help: --------------------------------------------------- session.gc_probability = 1 ; percentual probability that the ; 'garbage collection' process is started ; on every session initialization --------------------------------------------------- This means that there is 1% probability that the session cleanup is even started. --------------------------------------------------- session.gc_maxlifetime = 1440 ; after this number of seconds, stored ; data will be seen as 'garbage' and ; cleaned up by the gc process --------------------------------------------------- And this means, that IF the cleanup is started, then _only_ sessions older than 1440 seconds are deleted. --Jani --------------------------------------------------------------------------- [2001-01-02 12:38:53] bignat@mail.com Now, by a coincidence, I can tell you that it works, but not correctly. I mean I've put in php.ini the session.lifetime=300 and session_gc_maxlifetime=300, but they are not purged after 5 minutes. I still can use that session after 5 minutes.. (i did it so to try it). But once, after more of 5 hours of working, I got a message like "Warning: ... 11 session id's purged.." I think it works, but it seems to be 300 *minutes* or something, not seconds. Could you verify it?.. Thanx. --------------------------------------------------------------------------- [2001-01-02 08:48:49] sniper@php.net Please try PHP 4.0.4 if this works with it. --Jani --------------------------------------------------------------------------- [2000-12-31 12:16:57] bignat@mail.com I tryed to limit cookieless session lifetime, but the session.gc_maxlifetime option does not work. I don't have the id's removed from the /tmp directory. The POST/GET style lifetime is not builtin? then this is feature request! Thanx! You are great, guys! I'm using a php 4.0.2 (apache module) on a linux OS. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8501

« previous php.dev (#42789) next »