]> granicus.if.org Git - php/commitdiff
Due to dynamic registration of storage handlers, OnUpdateSaveHandler
authorSascha Schumann <sas@php.net>
Wed, 23 May 2001 23:18:51 +0000 (23:18 +0000)
committerSascha Schumann <sas@php.net>
Wed, 23 May 2001 23:18:51 +0000 (23:18 +0000)
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.

ext/session/session.c

index c83e1279b280c76d12e7147ebc16d64dcae03ced..80ab21844ce2665551e0ffd53be7ec5ac35cbf94 100644 (file)
@@ -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)) {