Edit report at https://bugs.php.net/bug.php?id=62129&edit=1
ID: 62129 Updated by: ar...@php.net Reported by: truth at proposaltech dot com Summary: rfc1867 crashes php even though turned off -Status: Open +Status: Closed Type: Bug Package: Session related Operating System: CentOS PHP Version: 5.4.3 Block user comment: N Private report: N New Comment: Automatic comment on behalf of array...@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=ba3234888dfbe14dadac7ac6c403a58bc1fdd220 Log: Fix bug #62129 - rfc1867 crashes php even though turned off Previous Comments: ------------------------------------------------------------------------ [2013-07-16 22:16:23] ras...@php.net felipe, the problem is that if mod_php.so doesn't actually get unloaded (usually because of circular references in another extension) then the php_rfc1867_callback global stays pointing to the previous value on the next MINIT which means now php_session_rfc1867_orig_callback will point to it as well and we are hosed. I think gxd305's approach is correct. ------------------------------------------------------------------------ [2013-06-24 19:11:32] fel...@php.net What's the problem assigning 'php_rfc1867_callback = php_session_rfc1867_orig_callback;' on PHP_MSHUTDOWN_FUNCTION? What happened to php_session_rfc1867_orig_callback is not pointing to the callback before MINIT? ------------------------------------------------------------------------ [2013-01-27 05:18:33] gxd305 at gmail dot com we should reset php_rfc1867_callback and php_session_rfc1867_orig_callback to null in MSHUTDOWN while changing them in MINIT. with this patch php-5.4.11-session-reset-global-var-in-shutdown our php works fine in the production. of course, it's not the fundamental solution ------------------------------------------------------------------------ [2013-01-19 13:49:03] gxd305 at gmail dot com i'm sorry for the last comment for the wrong analysis. it should be php_rfc1867_callback reserve the old value ( php_session_rfc1867_callback) after reload, and make php_session_rfc1867_callback be called recursively. ------------------------------------------------------------------------ [2013-01-19 11:26:34] gxd305 at gmail dot com the other extensions have the similar problems if not set the global var to null in mshutdown after reload. php_session_rfc1867_orig_callback reserve the last value after reload, instead of the default value nullã such as ice-php has the same problem, not set the global vars to null in mshutdown. if i set the global vars ' default value explicitly or set the global vars to null in mshutdown, the problem goes away. ------------------------------------------------------------------------ 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=62129 -- Edit this bug report at https://bugs.php.net/bug.php?id=62129&edit=1