From: "Edward Z. Yang" <ezy...@mit.edu>

Functionality is not included for other SAPIs because they either do not
support .user.ini (e.g. CLI) or they serve multiple requests and thus
do not support dl() (e.g. FastCGI).

There is also a bugfix to invoke zlist_clean, to ensure extension_lists can be
reused for the second round of extension appliations (since the head and tail
pointers have garbage in them).

Signed-off-by: Edward Z. Yang <ezy...@mit.edu>
---
 main/php_ini.c      | 4 ++--
 sapi/cgi/cgi_main.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/main/php_ini.c b/main/php_ini.c
index 89a3d7e..1fde28e 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -709,8 +709,8 @@ void php_ini_register_extensions(TSRMLS_D)
        zend_llist_apply(&extension_lists.engine, php_load_zend_extension_cb 
TSRMLS_CC);
        zend_llist_apply(&extension_lists.functions, php_load_php_extension_cb 
TSRMLS_CC);
 
-       zend_llist_destroy(&extension_lists.engine);
-       zend_llist_destroy(&extension_lists.functions);
+       zend_llist_clean(&extension_lists.engine);
+       zend_llist_clean(&extension_lists.functions);
 }
 /* }}} */
 
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 7856e0c..d944f3a 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -818,6 +818,7 @@ static void php_cgi_ini_activate_user_config(char *path, 
int path_len, const cha
 
        /* Activate ini entries with values from the user config hash */
        php_ini_activate_config(entry->user_config, PHP_INI_PERDIR, 
PHP_INI_STAGE_HTACCESS TSRMLS_CC);
+       php_ini_register_extensions(TSRMLS_CC);
 }
 /* }}} */
 
-- 
1.7.11.3


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to