Edit report at https://bugs.php.net/bug.php?id=70871&edit=1
ID: 70871
Updated by: yohgaki@php.net
Reported by: jacky at xsteach dot com
Summary: session_regenerate_id(): Failed to create session
ID: user (path: )
Status: Assigned
Type: Bug
Package: Session related
Operating System: mac os x
PHP Version: 7.0.0RC6
Assigned To: yohgaki
Block user comment: N
Private report: N
New Comment:
@narf
session_start() should never raise error like
Warning: session_regenerate_id(): Cannot regenerate session id - session is not active in - on line
4
If you think it's not your save handler's problem, please file a new bug report with your
save handler code.
Recent (5.6 and up, IIRC) has stricter specification for save handlers. Refer to
https://bugs.php.net/bug.php?id=70520
even example save handler in the manual was wrong.
Previous Comments:
------------------------------------------------------------------------
[2015-11-10 18:10:58] narf at devilix dot net
With a custom session handler, it also spits out the same error message *immediately after* a
session_start() call - at that point, the session is not inactive.
Also, this is a breaking change and should not happen at the RC stage.
------------------------------------------------------------------------
[2015-11-10 01:55:09] yohgaki@php.net
@laruence
Yes. Session becames inactive by calling session_destroy(). Therefore, session_regenerate_id()
complains about bogus call as it requires active session to be useful.
------------------------------------------------------------------------
[2015-11-08 07:24:26] bellosthomas at gmail dot com
Similar problem here
I have a custom session handler storing session in memcache
However, when I invoke session_regenerate_id(true), I get a fatal error
Catchable fatal error: session_regenerate_id(): Failed to create session ID: user
------------------------------------------------------------------------
[2015-11-06 14:42:19] laruence@php.net
this should be a intentional change, https://github.com/php/php-src/commit/e93042998af1fea9204e17bc5cdd13c702156d5b
@yohgaki ?
------------------------------------------------------------------------
[2015-11-06 11:36:07] jacky at xsteach dot com
Description:
------------
before php7RC3,the test script is working well,but a warning is throw after php7RC2.
Test script:
---------------
session_start();
session_destroy();
session_regenerate_id(true);
Expected result:
----------------
output nothing
Actual result:
--------------
Warning: session_regenerate_id(): Cannot regenerate session id
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70871&edit=1