#32064 [NEW]: session_regenerate_id doesn't remove old session file
| From: | michal-bcc at logix dot cz | Date: | Tue, 22 Feb 2005 10:13:21 +0000 |
| Subject: | #32064 [NEW]: session_regenerate_id doesn't remove old session file | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-74413@lists.php.net to get a copy of this message | ||
From: michal-bcc at logix dot cz
Operating system: Linux/x86
PHP version: 4.3.8
PHP Bug Type: Session related
Bug description: session_regenerate_id doesn't remove old session file
Description:
------------
When regenerating session ID with session_regenerate_id() the file with
old ID is kept in the appropriate directory.
Say that I create a session with session_start() and get ID=abcd. Then
sess_abcd is created.
Later I decide to generate a different ID for whatever reason, call
session_regenerate_id() and get ID=1234. The old file sess_abcd, although
truncated, is still kept in the filesystem. IMO it should be removed at
the time of session_regenerate_id() completion.
Reproduce code:
---------------
<?
session_start();
echo "session1 = ".session_id();
session_regenerate_id();
echo "session2 = ".session_id();
?>
Expected result:
----------------
Only a single file sess_<session2> should be in session dir.
Actual result:
--------------
However both files are still there...
--
Edit bug report at http://bugs.php.net/?id=32064&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32064&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32064&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32064&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32064&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32064&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32064&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32064&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32064&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32064&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32064&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32064&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32064&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32064&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32064&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32064&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32064&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32064&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32064&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32064&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32064&r=mysqlcfg