[Pkg-php-commits] [php/debian-sid] Apply patch to fix loading of extensions without [PHP] section (Closes: #595761)

Ondřej Surý ondrej at sury.org
Thu Oct 21 13:10:17 UTC 2010


---
 debian/patches/php-5.3.4-ini.patch |   30 ++++++++++++++++++++++++++++++
 debian/patches/series              |    1 +
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/php-5.3.4-ini.patch

diff --git a/debian/patches/php-5.3.4-ini.patch b/debian/patches/php-5.3.4-ini.patch
new file mode 100644
index 0000000..4ac30dd
--- /dev/null
+++ b/debian/patches/php-5.3.4-ini.patch
@@ -0,0 +1,30 @@
+--- a/main/php_ini.c
++++ b/main/php_ini.c
+@@ -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)
+ /* }}} */
+ 
+@@ -628,9 +629,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));
+@@ -642,6 +640,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 {
diff --git a/debian/patches/series b/debian/patches/series
index bb4b8bf..9305012 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -53,3 +53,4 @@ fpm_gcc_atomics.patch
 php-fpm-man-section-and-cleanup.patch
 fpm-config.patch
 CVE-2010-2950.patch
+php-5.3.4-ini.patch
-- 
1.7.1





More information about the Pkg-php-commits mailing list