diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-11-18 18:59:49 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-11-18 18:59:49 +0000 |
commit | 110344d65ce1571c591cbefc3247b35595eae390 (patch) | |
tree | 14cb4eecf8dbfe371141bab65fab855986e9fe18 | |
parent | 54a5c714caacdb82889604ca7fe8792cc03b89b7 (diff) | |
download | php-git-110344d65ce1571c591cbefc3247b35595eae390.tar.gz |
Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module).
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 18 |
2 files changed, 14 insertions, 5 deletions
@@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Nov 2005, PHP 5.1 +- Fixed bug #35278 (Multiple virtual() calls crash Apache 2 php module). (Ilia) - Fixed bug #35273 (Error in mapping soap - java types). (Dmitry) 17 Nov 2005, PHP 5.1 Release Candidate 6 diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index d74ff58730..354e2b9c60 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -443,6 +443,18 @@ static void php_apache_request_dtor(request_rec *r TSRMLS_DC) php_request_shutdown(NULL); } +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(); + } + if (p) { + ((php_struct *)SG(server_context))->r = p; + } else { + apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); + } +} + static int php_handler(request_rec *r) { php_struct *ctx; @@ -453,11 +465,7 @@ static int php_handler(request_rec *r) request_rec *parent_req = NULL; TSRMLS_FETCH(); -#define PHPAP_INI_OFF \ - if (strcmp(r->protocol, "INCLUDED")) { \ - zend_try { zend_ini_deactivate(TSRMLS_C); } zend_end_try(); \ - } \ - apr_pool_cleanup_run(r->pool, (void *)&SG(server_context), php_server_context_cleanup); \ +#define PHPAP_INI_OFF php_apache_ini_dtor(r, parent_req TSRMLS_CC); conf = ap_get_module_config(r->per_dir_config, &php5_module); |