From dfaa06dbd76a2e5a1d88ca281b9a4b5804e4b077 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 29 Jan 2004 15:18:26 +0000 Subject: Apache 2 portion of the fix for bug #25753. --- sapi/apache2filter/sapi_apache2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sapi/apache2filter') diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 8116c463c0..570d012328 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -429,11 +429,17 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) TSRMLS_FETCH(); if (f->r->proxyreq) { + zend_try { + zend_ini_deactivate(TSRMLS_C); + } zend_end_try(); return ap_pass_brigade(f->next, bb); } /* handle situations where user turns the engine off */ if (*p == '0') { + zend_try { + zend_ini_deactivate(TSRMLS_C); + } zend_end_try(); return ap_pass_brigade(f->next, bb); } @@ -451,11 +457,17 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) if (ctx == NULL) { ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, f->r, "php failed to get server context"); + zend_try { + zend_ini_deactivate(TSRMLS_C); + } zend_end_try(); return HTTP_INTERNAL_SERVER_ERROR; } ctx->f = f; /* save whatever filters are after us in the chain. */ if (ctx->request_processed) { + zend_try { + zend_ini_deactivate(TSRMLS_C); + } zend_end_try(); return ap_pass_brigade(f->next, bb); } -- cgit v1.2.1