From:             
Operating system: ubuntu
PHP version:      Irrelevant
Package:          Session related
Bug Type:         Feature/Change Request
Bug description:garbage collector destroys session of caller, no write 

Description:
------------
The order is session open, session read, session gc.

This applies to the case where the garbage collector is triggered by the
client 
X and the session is of client X.

The session variables are available in script, but the sessionfile is
deleted 
and no write of the session takes place.

For the php user and the php application user there is the impression that
the 
session still is alive.

Example:
User is logged in with cookie with sessionid in an admin application and is

logged in as admin which is registerred in the session.
Has admin form bookmarked or in history.
Php script does gc removes sessionfile.
But the session variables indicate that the user is logged in and so the
script 
spits out the form.
User does a post and poof suddenly there is no session.

This is seemingly random behaviour and no ordinary php programmer and user
has 
any idea what is going on.

This sounds like one in a million but could happen quite often with a
database 
application in a small business.

So either the session should be removed before open and read, which I
understand 
you won't do (Bug #35479) 
or it should be continued and rewritten to file, which is what the
bahaviour 
when you write the most straightforward handler for a session database

Also as a dev. how do I know it is garbage collected? 

Test script:
---------------
setup:
ubuntu package mod php 5.3.10 on apache2 mpm prefork

relevant and changed ini setting:
session.gc_maxlifetime = 1
session.save_path = /tmp



Expected result:
----------------
session that is garbage collected by invocation of session owner (http
client) is 
rewritten to a new file

Actual result:
--------------
session variables are available but session is effectively destroyed,
giving the 
impression that the session is still live when it is not

-- 
Edit bug report at https://bugs.php.net/bug.php?id=61932&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61932&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61932&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61932&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61932&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61932&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61932&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61932&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61932&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61932&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61932&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61932&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61932&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61932&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61932&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61932&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61932&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61932&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61932&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61932&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61932&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61932&r=mysqlcfg

Reply via email to