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

sapi/apache2handler/sapi_apache2.c

index 354e2b9c600e6fc681dbed07b776b3c827cd64fd..0a9ab08ac8a47588470a559568175d7318a52176 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"))) {
 normal:
                ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
                /* register a cleanup so we clear out the SG(server_context)