From: foobar Date: Tue, 24 Feb 2004 08:49:41 +0000 (+0000) Subject: MFH: - Fixed bug #26005 (Random "cannot change the session ini settings" errors). X-Git-Tag: php-4.3.5RC4~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9543e9c11188f323b938913773368cba5596e46e;p=php MFH: - Fixed bug #26005 (Random "cannot change the session ini settings" errors). --- diff --git a/NEWS b/NEWS index c18c3b0254..b8a0edf829 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ PHP 4 NEWS reference). (Ilia) - Fixed bug #26753 (zend_fetch_list_dtor_id() doesn't check NULL strings). (Jani, Markus dot Lidel at shadowconnect dot com) +- Fixed bug #26005 (Random "cannot change the session ini settings" errors). + (Jani, jsnajdr at kerio dot com) 16 Feb 2004, Version 4.3.5RC3 - Fixed zero bytes memory allocation when no extra ini files are found in the diff --git a/ext/session/session.c b/ext/session/session.c index d0ad73588c..ed5098fac4 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1612,14 +1612,26 @@ PHP_RSHUTDOWN_FUNCTION(session) } /* }}} */ +static void php_minit_session_globals(php_ps_globals *ps_globals) +{ + ps_globals->save_path = NULL; + ps_globals->session_name = NULL; + ps_globals->id = NULL; + ps_globals->mod = NULL; + ps_globals->mod_data = NULL; + ps_globals->session_status = php_session_none; + ps_globals->http_session_vars = NULL; +} PHP_MINIT_FUNCTION(session) { #ifdef ZTS php_ps_globals *ps_globals; - ts_allocate_id(&ps_globals_id, sizeof(php_ps_globals), NULL, NULL); + ts_allocate_id(&ps_globals_id, sizeof(php_ps_globals), (ts_allocate_ctor) php_minit_session_globals, NULL); ps_globals = ts_resource(ps_globals_id); +#else + php_minit_session_globals(&ps_globals); #endif zend_register_auto_global("_SESSION", sizeof("_SESSION")-1 TSRMLS_CC);