summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/sapi_apache2.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-01-29 15:18:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-01-29 15:18:26 +0000
commitdfaa06dbd76a2e5a1d88ca281b9a4b5804e4b077 (patch)
tree74bd4c86c08ab91dcc6b185032a41caa4cc6acc7 /sapi/apache2handler/sapi_apache2.c
parentc33d480386ecdb4c664a05bb7cee819076dd3fca (diff)
downloadphp-git-dfaa06dbd76a2e5a1d88ca281b9a4b5804e4b077.tar.gz
Apache 2 portion of the fix for bug #25753.
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
-rw-r--r--sapi/apache2handler/sapi_apache2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index f6bc71f61b..e00687f9cb 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -459,21 +459,33 @@ static int php_handler(request_rec *r)
if (strcmp(r->handler, PHP_MAGIC_TYPE) && strcmp(r->handler, PHP_SOURCE_MAGIC_TYPE) && strcmp(r->handler, PHP_SCRIPT)) {
/* Check for xbithack in this case. */
if (!AP2(xbithack) || strcmp(r->handler, "text/html") || !(r->finfo.protection & APR_UEXECUTE)) {
+ zend_try {
+ zend_ini_deactivate(TSRMLS_C);
+ } zend_end_try();
return DECLINED;
}
}
/* handle situations where user turns the engine off */
if (!AP2(engine)) {
+ zend_try {
+ zend_ini_deactivate(TSRMLS_C);
+ } zend_end_try();
return DECLINED;
}
if (r->finfo.filetype == 0) {
php_apache_sapi_log_message("script not found or unable to stat");
+ zend_try {
+ zend_ini_deactivate(TSRMLS_C);
+ } zend_end_try();
return HTTP_NOT_FOUND;
}
if (r->finfo.filetype == APR_DIR) {
php_apache_sapi_log_message("attempt to invoke directory as script");
+ zend_try {
+ zend_ini_deactivate(TSRMLS_C);
+ } zend_end_try();
return HTTP_FORBIDDEN;
}