summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2001-05-23 23:18:51 +0000
committerSascha Schumann <sas@php.net>2001-05-23 23:18:51 +0000
commit5e112d4384898bd6548e196122225add5875cfeb (patch)
treeabdb0da2ee56e47d63280bf1c77863d843ad62d5
parent64c915e4f7fd40d5ad72b880cfb18faa4be80b4b (diff)
downloadphp-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.c15
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)) {