iliaa Thu Jan 29 10:18:27 2004 EDT Modified files: /php-src/sapi/apache2filter sapi_apache2.c /php-src/sapi/apache2handler sapi_apache2.c Log: Apache 2 portion of the fix for bug #25753. http://cvs.php.net/diff.php/php-src/sapi/apache2filter/sapi_apache2.c?r1=1.121&r2=1.122&ty=u Index: php-src/sapi/apache2filter/sapi_apache2.c diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.121 php-src/sapi/apache2filter/sapi_apache2.c:1.122 --- php-src/sapi/apache2filter/sapi_apache2.c:1.121 Thu Jan 8 03:18:04 2004 +++ php-src/sapi/apache2filter/sapi_apache2.c Thu Jan 29 10:18:25 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.121 2004/01/08 08:18:04 andi Exp $ */ +/* $Id: sapi_apache2.c,v 1.122 2004/01/29 15:18:25 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.33&r2=1.34&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.33 php-src/sapi/apache2handler/sapi_apache2.c:1.34 --- php-src/sapi/apache2handler/sapi_apache2.c:1.33 Wed Jan 28 21:16:47 2004 +++ php-src/sapi/apache2handler/sapi_apache2.c Thu Jan 29 10:18:26 2004 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.33 2004/01/29 02:16:47 iliaa Exp $ */ +/* $Id: sapi_apache2.c,v 1.34 2004/01/29 15:18:26 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -459,21 +459,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