diff options
author | Sascha Schumann <sas@php.net> | 2001-05-23 23:18:51 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2001-05-23 23:18:51 +0000 |
commit | 5e112d4384898bd6548e196122225add5875cfeb (patch) | |
tree | abdb0da2ee56e47d63280bf1c77863d843ad62d5 | |
parent | 64c915e4f7fd40d5ad72b880cfb18faa4be80b4b (diff) | |
download | php-git-5e112d4384898bd6548e196122225add5875cfeb.tar.gz |
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.
-rw-r--r-- | ext/session/session.c | 15 |
1 files changed, 12 insertions, 3 deletions
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)) { |