iliaa Wed Aug 17 21:11:17 2005 EDT Modified files: /php-src/sapi/apache2handler sapi_apache2.c Log: Fixed bug #33987 (php script as ErrorDocument causes crash in Apache 2). http://cvs.php.net/diff.php/php-src/sapi/apache2handler/sapi_apache2.c?r1=1.57&r2=1.58&ty=u Index: php-src/sapi/apache2handler/sapi_apache2.c diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.57 php-src/sapi/apache2handler/sapi_apache2.c:1.58 --- php-src/sapi/apache2handler/sapi_apache2.c:1.57 Wed Aug 3 10:08:48 2005 +++ php-src/sapi/apache2handler/sapi_apache2.c Wed Aug 17 21:11:13 2005 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sapi_apache2.c,v 1.57 2005/08/03 14:08:48 sniper Exp $ */ +/* $Id: sapi_apache2.c,v 1.58 2005/08/18 01:11:13 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -458,6 +458,7 @@ /* apply_config() needs r in some cases, so allocate server_context early */ ctx = SG(server_context); if (ctx == NULL) { +normal: ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx)); /* register a cleanup so we clear out the SG(server_context) * after each request. Note: We pass in the pointer to the @@ -536,6 +537,11 @@ } } else { parent_req = ctx->r; + /* check if comming due to ErrorDocument */ + if (parent_req != HTTP_OK) { + parent_req = NULL; + goto normal; + } ctx->r = r; brigade = ctx->brigade; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php