Edit report at https://bugs.php.net/bug.php?id=69127&edit=1
ID: 69127
Updated by: yohgaki@php.net
Reported by: rbsimao at yahoo dot com dot br
Summary: session_regenerate_id(true) randomly generates a
warning and loses session data
Status: Verified
Type: Bug
Package: Session related
Operating System: debian7, ubuntu11-12-13-14, win7
PHP Version: 5.5.22
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
This bug is related to
https://bugs.php.net/bug.php?id=65746
Previous Comments:
------------------------------------------------------------------------
[2015-02-27 05:00:31] yohgaki@php.net
This is known issue and I proposed fix for this.
However, there are people who do not like my proposal.
Since session data and browser is not synced, session module must handle session_regenerate_id(true)
in async way. This is what I proposed before.
I shall try to fix this again. Thank you for reporting.
------------------------------------------------------------------------
[2015-02-26 18:05:05] rbsimao at yahoo dot com dot br
Description:
------------
---
From manual page: http://www.php.net/function.session-regenerate-id
---
The piece of code below works ok most of the time. Randomly it does not work:
session_regenerate_id(true) issues a warning saying it could not delete the old session data. But
the session file is there and the permissions are untouched. Also, when it issues the warning, all
the session data is lost on the new generated session.
Tested on ubuntu11 to ubuntu14 with default phps and windows 7/php5.5.
Test script:
---------------
<?php
session_start();
session_regenerate_id(true);
session_write_close();
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69127&edit=1