Bug #69127 [Opn->Ver]: session_regenerate_id(true) randomly generates a warning and loses session data

From: Date: Fri, 27 Feb 2015 05:00:32 +0000
Subject: Bug #69127 [Opn->Ver]: session_regenerate_id(true) randomly generates a warning and loses session data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190979@lists.php.net to get a copy of this message
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: Open +Status: Verified Type: Bug Package: Session related Operating System: debian7, ubuntu11-12-13-14, win7 PHP Version: 5.5.22 -Assigned To: +Assigned To: yohgaki Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#190979) next »