cvs: php4 /ext/session session.c
| From: | Sascha Schumann | Date: | Wed, 23 May 2001 23:18:51 +0000 |
| Subject: | cvs: php4 /ext/session session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5972@lists.php.net to get a copy of this message | ||
sas Wed May 23 16:18:51 2001 EDT
Modified files:
/php4/ext/session session.c
Log:
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.
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.204 php4/ext/session/session.c:1.205
--- php4/ext/session/session.c:1.204 Tue May 22 10:55:07 2001
+++ php4/ext/session/session.c Wed May 23 16:18:51 2001
@@ -1363,9 +1363,18 @@
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)) {