php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52786
Patch php-5.3.4-ini.patch revision 2010-09-06 18:54 UTC by fedora at famillecollet dot com

Patch php-5.3.4-ini.patch for *Configuration Issues Bug #52786

Patch version 2010-09-06 18:54 UTC

Return to Bug #52786 | Download this patch
Patch Revisions:

Developer: fedora@famillecollet.com

diff -up php5.3-201009061630/main/php_ini.c.resetini php5.3-201009061630/main/php_ini.c
--- php5.3-201009061630/main/php_ini.c.resetini	2010-08-31 00:34:49.000000000 +0200
+++ php5.3-201009061630/main/php_ini.c	2010-09-06 20:26:37.946426389 +0200
@@ -201,6 +201,7 @@ PHPAPI void config_zval_dtor(zval *zvalu
 /* Reset / free active_ini_sectin global */
 #define RESET_ACTIVE_INI_HASH() do { \
 	active_ini_hash = NULL;          \
+	is_special_section = 0;          \
 } while (0)
 /* }}} */
 
@@ -654,9 +655,6 @@ int php_init_config(TSRMLS_D)
 		zend_llist_element *element;
 		int l, total_l = 0;
 
-		/* Reset active ini section */
-		RESET_ACTIVE_INI_HASH();
-
 		if ((ndir = php_scandir(php_ini_scanned_path, &namelist, 0, php_alphasort)) > 0) {
 			zend_llist_init(&scanned_ini_list, sizeof(char *), (llist_dtor_func_t) free_estring, 1);
 			memset(&fh, 0, sizeof(fh));
@@ -668,6 +666,9 @@ int php_init_config(TSRMLS_D)
 					free(namelist[i]);
 					continue;
 				}
+				/* Reset active ini section */
+				RESET_ACTIVE_INI_HASH();
+
 				if (IS_SLASH(php_ini_scanned_path[php_ini_scanned_path_len - 1])) {
 					snprintf(ini_file, MAXPATHLEN, "%s%s", php_ini_scanned_path, namelist[i]->d_name);
 				} else {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC