#14798 [Ctl->Opn]: session.gc_maxlifetime does not work (Reopen Bug ID #3793)

From: Date: Sat, 17 Aug 2002 01:02:45 +0000
Subject: #14798 [Ctl->Opn]: session.gc_maxlifetime does not work (Reopen Bug ID #3793)
References: 1  Groups: php.bugs php.doc 
Request: Send a blank email to php-bugs+get-17061@lists.php.net to get a copy of this message
ID: 14798 Updated by: rasmus@php.net Reported By: bs_php@infeer.com -Status: Critical +Status: Open -Bug Type: Session related +Bug Type: Documentation problem Operating System: Windows ONLY PHP Version: 4.1.1 New Comment: I really don't see anybody with any interest in writing code to make this work on FAT filesystems. Don't run web servers on crap filesystems. If you do, write your own session handler. Same goes for filesystems where file modification timestamps are ignored. Write your own session handler and manage the garbage collection yourself. We'll need to document this, of course, so marking this as a documentation problem. Previous Comments: ------------------------------------------------------------------------ [2002-07-02 10:50:31] chlabicz@plusnet.pl The bug almost killed me. >[23 Jan 6:00am] yohgaki@php.net >Could you try see if it helps? >session.save_path = C:\tmp\path\for\session\data >..... But wouldn't the session.gc_probability = 0 do the same (for me it seems to work fine). ------------------------------------------------------------------------ [2002-02-26 06:37:27] yohgaki@php.net Please do _NOT_ add comment if you are using other than Windows. ------------------------------------------------------------------------ [2002-02-26 03:14:52] zhaoxd@capitel.com.cn My Operating System is Linux,and I found the same error. session.gc_maxlifetime = 60 It's doesn't work ------------------------------------------------------------------------ [2002-02-09 15:38:28] adnev@podvdonik.cz I don't know if the problem is related to mtime or atime or what else but on win2k+fat32, there are three pieces of information about file times: - creation time: precision=seconds - last modification time: precision=seconds - last access time: precision=days As you see the last access time is somehow special. If you want to get this time in seconds it will return the time corresponding to midnight of that day. A problem that can not be solved: The file last modified time is updated only if the file is written. This happens only when some session data is modified. A web client can surf on a site during 1 hour without modifying any session data. So logicaly, using the garbage collector with a maxlifetime less than 2 days (on a win+fat platform) will result in data losses. And test reports: I have tested the following: .maxlifetime=3700 .probability=100 - set the time to midnight + 2 minutes - create 1 session file - create a second session file thanks to another client of my website => the first session file was deleted - browse the site with one client only (=1 session file) => the file name was modified on every access that means that the file was deleted on a session_start call and a new created on the script termination (implicit call to session_stop) May this help you to improve the garbage collection feature. ------------------------------------------------------------------------ [2002-01-23 06:00:43] yohgaki@php.net Could you try see if it helps? session.save_path = C:\tmp\path\for\session\data If save path is deep enough, session module will not delete data files. You should be able to workaround this problem with deep save path. (And you can delete too old session data files with batch job) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/14798 -- Edit this bug report at http://bugs.php.net/?id=14798&edit=1

« previous php.bugs (#17061) next »