From: Sascha Schumann Date: Wed, 23 May 2001 23:18:51 +0000 (+0000) Subject: Due to dynamic registration of storage handlers, OnUpdateSaveHandler X-Git-Tag: PRE_GRANULAR_GARBAGE_FIX~256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e112d4384898bd6548e196122225add5875cfeb;p=php Due to dynamic registration of storage handlers, OnUpdateSaveHandler might be called before that registration takes place and hence the INI update is dismissed. In that case, we defer the lookup to the first request init. --- diff --git a/ext/session/session.c b/ext/session/session.c index c83e1279b2..80ab21844c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -1363,9 +1363,18 @@ PHP_RINIT_FUNCTION(session) php_rinit_session_globals(PSLS_C); if (PS(mod) == NULL) { - /* current status is unusable */ - PS(nr_open_sessions) = -1; - return SUCCESS; + char *value; + + value = zend_ini_string("session.save_handler", sizeof("session.save_handler"), 0); + if (value) { + PS(mod) = _php_find_ps_module(value PSLS_CC); + } + + if (!PS(mod)) { + /* current status is unusable */ + PS(nr_open_sessions) = -1; + return SUCCESS; + } } if (PS(auto_start)) {