Warning when using session_regenerate_id(TRUE) with a SessionHandler
| From: | dabo | Date: | Sun, 28 Oct 2012 03:05:59 +0000 |
| Subject: | Warning when using session_regenerate_id(TRUE) with a SessionHandler | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-63682@lists.php.net to get a copy of this message | ||
Hi folks,
I believe there's an issue with the SessionHandler implementation and
the way the destroy handler is invoked when using
session_regenerate_id(TRUE)
Using latest stable Gentoo PHP 5.4.6 but as far as I could tell the C
code source for this part hasn't since been touched up to master.
The following code generates a warning :
$handler = new SessionHandler();
session_set_save_handler($handler, TRUE); // or FALSE, doesn't matter
session_start();
session_regenerate_id(TRUE);
//session_write_close();
-----------
PHP Warning: Unknown: Parent session handler is not open in Unknown on line 0
The call to session_write_close() just adds a proper backtrace.
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).
Any reason "session_status" isn't checked instead ?
Can anyone confirm ?
Thank you