]> granicus.if.org Git - php/commitdiff
Fixed bug #39797 (virtual() does not reset changed INI settings).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 12 Dec 2006 18:05:25 +0000 (18:05 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 12 Dec 2006 18:05:25 +0000 (18:05 +0000)
NEWS
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index fa8fd9aa8c45cf133b218767bf20888ce2e1b2f1..67a19ee1e4e3a0e9c28759ca54c43daa34e49785 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -50,6 +50,7 @@ PHP                                                                        NEWS
 - Fixed FastCGI impersonation for persistent connections on Windows. (Dmitry)
 - Fixed wrong signature initialization in imagepng (Takeshi Abe)
 - Added optimization for imageline with horizontal and vertial lines (Pierre)
+- Fixed bug #39797 (virtual() does not reset changed INI settings). (Ilia)
 - Fixed bug #39795 (build fails on AIX because crypt_r() uses different data 
   struct). (Tony)
 - Fixed bug #39791 (Crash in strtotime() on overly long relative date
index b5818f8385109733dfdfcbd10eda28adf4f2ef42..87b186153184735f86e433ccae4ecb10074dc149 100644 (file)
@@ -467,6 +467,20 @@ static void php_apache_ini_dtor(request_rec *r, request_rec *p TSRMLS_DC)
 {
        if (strcmp(r->protocol, "INCLUDED")) {
                zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try();
+       } else {
+typedef struct {
+       HashTable config;
+} php_conf_rec;
+               char *str;
+               uint str_len;
+               php_conf_rec *c = ap_get_module_config(r->per_dir_config, &php5_module);
+
+               for (zend_hash_internal_pointer_reset(&c->config); 
+                               zend_hash_get_current_key_ex(&c->config, &str, &str_len, NULL, 0,  NULL) == HASH_KEY_IS_STRING;
+                               zend_hash_move_forward(&c->config)
+               ) {
+                       zend_restore_ini_entry(str, str_len, ZEND_INI_STAGE_SHUTDOWN);
+               }       
        }
        if (p) {
                ((php_struct *)SG(server_context))->r = p;