php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36872 session_destroy() fails after call to session_regenerate_id()
Submitted: 2006-03-27 13:30 UTC Modified: 2006-04-17 23:30 UTC
From: chris at dented-planet dot net Assigned: sas (profile)
Status: Closed Package: Session related
PHP Version: 5.1.2 OS: mac os x 10.3.9
Private report: No CVE-ID: None
 [2006-03-27 13:30 UTC] chris at dented-planet dot net
Description:
------------
Calling session_destroy() after call to session_regenerate_id() results in the failed session destruction and the following warning:

Warning: session_destroy() [function.session-destroy]: Session object destruction failed...

If I remove the call to session_regenerate() then session_destroy() works correctly.

Reproduce code:
---------------
<?php

ob_start()

session_start();

//some code

session_regenerate_id(true);

//some code

session_destroy();

ob_end_flush();

?>

Expected result:
----------------
Session should be destroyed

Actual result:
--------------
Warning: session_destroy() [function.session-destroy]: Session object destruction failed...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-28 14:10 UTC] mike@php.net
Adding 
>>VCWD_ACCESS(buf, F_OK) == 0<< to 
>>VCWD_UNLINK(buf) == -1)<< in mod_files' DESTROY function fixes the warning, but the old session file still lingers around.

 [2006-04-17 23:30 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC