summaryrefslogtreecommitdiff
path: root/sapi/apache2handler
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-12-12 18:05:25 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-12-12 18:05:25 +0000
commitcbaaf1bc0751db56df25f136085d54337b07d90e (patch)
tree602834c5b416fc9430e66ce47f3ec757543b186d /sapi/apache2handler
parente034b4a8b088b6ac664405874b0a43650afb1f7a (diff)
downloadphp-git-cbaaf1bc0751db56df25f136085d54337b07d90e.tar.gz
Fixed bug #39797 (virtual() does not reset changed INI settings).
Diffstat (limited to 'sapi/apache2handler')
-rw-r--r--sapi/apache2handler/sapi_apache2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index b5818f8385..87b1861531 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -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;