]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php
authorIlia Alshanetsky <iliaa@php.net>
Wed, 14 Dec 2005 03:38:55 +0000 (03:38 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 14 Dec 2005 03:38:55 +0000 (03:38 +0000)
script is loaded via SSI include).

NEWS
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index e004e3d03edede611542eaa6f726d40313c8caa8..36da8f351c3df86b24fb3a59efa4c03d2390cdcf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ PHP 4                                                                      NEWS
   (vovik at getart dot ru, Tony)
 - Fixed bug #35594 (Multiple calls to getopt() may result in a crash).
   (rabbitt at gmail dot com, Ilia)
+- Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php 
+  script is loaded via SSI include). (Ilia)
 - Fixed bug #35536 (mysql_field_type() doesn't handle NEWDECIMAL). (Tony)
 - Fixed bug #35410 (wddx_deserialize() doesn't handle large ints as keys 
   properly). (Ilia)
index 31a7a292133ed88af012e67f22922632910c8f2b..ac22d652d13126dcc867fce04f75ffe4f586dfe5 100644 (file)
@@ -471,7 +471,7 @@ static int php_handler(request_rec *r)
 
        /* apply_config() needs r in some cases, so allocate server_context early */
        ctx = SG(server_context);
-       if (ctx == NULL) {
+       if (ctx == NULL || (ctx && ctx->request_processed && !strcmp(r->protocol, "INCLUDED"))) {
                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