ID:               14798
 Updated by:       [EMAIL PROTECTED]
-Reported By:      [EMAIL PROTECTED]
+Reported By:      [EMAIL PROTECTED]
 Status:           Critical
 Bug Type:         Session related
 Operating System: Win 2k
 PHP Version:      4.1.1
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[2002-01-23 06:00:43] [EMAIL PROTECTED]

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)



------------------------------------------------------------------------

[2002-01-23 05:35:58] [EMAIL PROTECTED]

This is data loss issue. Mark it as Critical.

------------------------------------------------------------------------

[2002-01-22 03:44:15] [EMAIL PROTECTED]

OS: W2K Professional (SP2)
WWW: Apache, IIS 5.0
Filesystem: FAT32

1) ISAPI module works fine with IIS 5.0. Is some bug in IIS 5.1?

2) There are same problems as I reported before with
"session.gc_maxlifetime".
     
3) "session.gc_probability  = 100" on FAT32 deletes other session files
except last accessed/created session file as before.  

-- Kori

------------------------------------------------------------------------

[2002-01-21 17:34:10] [EMAIL PROTECTED]

Hi, I tested PHP 4.1.0 (release) on Windows XP Professional and there
is my report:

WWW server: IIS 5.1
Filesystem: NTSF (Compressed)

PHP.INI:

[Session]
session.save_handler      = files   ; handler used to store/retrieve
data
session.save_path         = C:/Windows/Temp    ; argument passed to
save_handler
                                    ; in the case of files, this is
the
                                    ; path where data files are stored
session.use_cookies       = 0       ; whether to use cookies
session.name              = PHPSESSID  
                                    ; name of the session
                                    ; is used as cookie name
session.auto_start        = 0       ; initialize session on request
startup
session.cookie_lifetime   = 0       ; lifetime in seconds of cookie
                                    ; or if 0, until browser is
restarted
session.cookie_path       = /       ; the path the cookie is valid for
session.cookie_domain     =         ; the domain the cookie is valid
for
session.serialize_handler = php     ; handler used to serialize data
                                    ; php is the standard serializer of
PHP
session.gc_probability    = 100       ; percentual probability that the

                                    ; 'garbage collection' process is
started
                                    ; on every session initialization
session.gc_maxlifetime    = 600    ; after this number of seconds,
stored
                                    ; data will be seen as 'garbage'
and
                                    ; cleaned up by the gc process
session.referer_check     =         ; check HTTP Referer to invalidate

                                    ; externally stored URLs containing
ids
session.entropy_length    = 0       ; how many bytes to read from the
file
session.entropy_file      =         ; specified here to create the
session id
; session.entropy_length    = 16
; session.entropy_file      = /dev/urandom
session.cache_limiter     = nocache ; set to {nocache,private,public}
to
                                    ; determine HTTP caching aspects
session.cache_expire      = 180     ; document expires after n minutes
session.use_trans_sid     = 0       ; use transient sid support if
enabled
                                    ; by compiling with
--enable-trans-sid
url_rewriter.tags         =
"a=href,area=href,frame=src,input=src,form=fakeentry"

------------------------------------

1) The ISAPI module doesn't work right (there is some data output
error) with ISS 5.1.
   CGI version works fine.
   
2) There is still the same problem with "session.gc_maxlifetime".

3) "session.gc_probability = 100" - there is one change. It deleted all
files except last accessed session file in previous versions of PHP,
now It do nothing (NO files, including expired files are deleted).
   
4) Session_destroy() function works fine.


I will test CGI & ISAPI modules with W2K professional (Apache, IIS 5.0)
on FAT32 filesystem tomorrow.

-- Kori

------------------------------------------------------------------------

[2002-01-13 20:30:28] [EMAIL PROTECTED]

Under Windows, session save path's directory is FAT FS and save handler
is files, gc call is deleting all session files. 

Status = Analyzed.

(I cannot fix this one, since it's windows specific :)

------------------------------------------------------------------------

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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to