Bug #72156 [Opn->Wfx]: session_regenerate_id(): Session object destruction failed. ID: user (path: /v
| From: | yohgaki@php.net | Date: | Sat, 27 Aug 2016 07:00:14 +0000 |
| Subject: | Bug #72156 [Opn->Wfx]: session_regenerate_id(): Session object destruction failed. ID: user (path: /v | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203605@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72156&edit=1
ID: 72156
Updated by: yohgaki@php.net
Reported by: dimitar dot kudev at netea dot bg
Summary: session_regenerate_id(): Session object destruction
failed. ID: user (path: /v
-Status: Open
+Status: Wont fix
Type: Bug
Package: Session related
Operating System: Ubuntu 16.04
PHP Version: 7.0.6
Block user comment: N
Private report: N
New Comment:
Immediate session data destruction while regenerating session ID is _NOT_ recommended strongly. i.e.
Do not call session_regenerate_id(TRUE).
There are number of reasons session could misbehave by session_regenerate_id(TRUE).
Refer to https://wiki.php.net/rfc/precise_session_management
Although this RFC was declined, but problems described in the RFC will happen by
session_regenerate_id(TRUE). I recommend to manage session data as the RFC does. It could be done by
userland also.
That said, I'm not sure why you get the warning. It should not happen under normal
circumstance. If you get the error by simply calling session_regenerate_id(TRUE), please reopen
this bug.
Previous Comments:
------------------------------------------------------------------------
[2016-05-04 14:23:18] dimitar dot kudev at netea dot bg
Description:
------------
1. Apache/2.4.18 (Ubuntu)
2. PHP 7.0.4-7ubuntu2
3. 10.0.24-MariaDB-7 Ubuntu 16.04
Type: warning
File: /var/www/dragon/library/Zend/Session.php
Line: 315
Message: session_regenerate_id(): Session object destruction failed. ID: user (path:
/var/lib/php/sessions)
---
From manual page: http://www.php.net/function.session-regenerate-id
---
Test script:
---------------
public static function regenerateId()
{
if (!self::$_unitTestEnabled && headers_sent($filename, $linenum)) {
/** @see Zend_Session_Exception */
require_once 'Zend/Session/Exception.php';
throw new Zend_Session_Exception("You must call " . __CLASS__ . '::'
. __FUNCTION__ .
"() before any output has been sent to the browser; output started in
{$filename}/{$linenum}");
}
if ( !self::$_sessionStarted ) {
self::$_regenerateIdState = -1;
} else {
if (!self::$_unitTestEnabled) {
session_regenerate_id(true);
}
self::$_regenerateIdState = 1;
}
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72156&edit=1