iliaa Thu Jan 29 10:18:38 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/apache2filter sapi_apache2.c /php-src/sapi/apache2handler sapi_apache2.c Log: MFH: Apache 2 portion of the fix for bug #25753. http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.91.2.21&r2=1.91.2.22&ty=u Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.21 php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.22 --- php-src/sapi/apache2filter/sapi_apache2.c:1.91.2.21 Fri Dec 12 12:19:18 2003 +++ php-src/sapi/apache2filter/sapi_apache2.c Thu Jan 29 10:18:36 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.91.2.21 2003/12/12 17:19:18 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.91.2.22 2004/01/29 15:18:36 iliaa Exp $ */ #include <fcntl.h> @@ -429,11 +429,17 @@ 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 @@ 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); } http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.1.2.25&r2=1.1.2.26&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.25 php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.26 --- php-src/sapi/apache2handler/sapi_apache2.c:1.1.2.25 Wed Jan 28 21:18:17 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Thu Jan 29 10:18:37 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.1.2.25 2004/01/29 02:18:17 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.1.2.26 2004/01/29 15:18:37 iliaa Exp $ */ #include <fcntl.h> @@ -464,21 +464,33 @@ 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; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php