Edit report at https://bugs.php.net/bug.php?id=63379&edit=1
ID: 63379
Comment by: avatar2004-php at yahoo dot fr
Reported by: avatar2004-php at yahoo dot fr
Summary: Warning when using session_regenerate_id(TRUE) with
a SessionHandler
Status: Open
Type: Bug
Package: Session related
Operating System: Gentoo
PHP Version: 5.4.8
Block user comment: N
Private report: N
New Comment:
If I understand correctly and "mod_user_is_open" is just a global state
parameter used by the SessionHandler instance, I was wondering why the check
wasn't being done on "session_status" instead to conform with the rest of the
session_* API ?
Previous Comments:
------------------------------------------------------------------------
[2012-10-29 01:04:34] avatar2004-php at yahoo dot fr
Description:
------------
It seems there's an issue with the SessionHandler implementation and
the way the destroy handler is invoked when using
session_regenerate_id(TRUE)
The problem seems to come from using the global "mod_user_is_open" in
the PS_SANITY_CHECK_IS_OPEN macro (in ext/session/mod_user_class.c).
The test script generates an undue warning:
Test script:
---------------
$handler = new SessionHandler();
session_set_save_handler($handler, TRUE); // or FALSE, doesn't matter
session_start();
session_regenerate_id(TRUE);
//session_write_close();
Expected result:
----------------
No warning
Actual result:
--------------
PHP Warning: Unknown: Parent session handler is not open in Unknown on line 0
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=63379&edit=1