Bug #70871 [Com]: session_regenerate_id(): Failed to create session ID: user (path: )

From: Date: Thu, 12 Nov 2015 18:00:09 +0000
Subject: Bug #70871 [Com]: session_regenerate_id(): Failed to create session ID: user (path: )
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197204@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70871&edit=1

 ID:                 70871
 Comment by:         narf at devilix dot 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:

@yasuo

I didn't say that session_start() issues that message.

What I'm saying is that calling session_regenerate_id() *immediately after* session_start(),
would issue this:

session_regenerate_id(): Failed to create session ID: user (path: <value of
session.save_path>)

And I'm kind of proxy-ing a bug report that was submitted to me here: https://github.com/bcit-ci/CodeIgniter/issues/4230


Previous Comments:
------------------------------------------------------------------------
[2015-11-12 02:19:48] yohgaki@php.net

@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.

------------------------------------------------------------------------
[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 ?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=70871


--
Edit this bug report at https://bugs.php.net/bug.php?id=70871&edit=1


Thread (15 messages)

« previous php.bugs (#197204) next »