summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/sapi_apache2.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-12-14 03:36:44 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-12-14 03:36:44 +0000
commit00b9392bf5fc116cfc3f6108805ca918180fcba2 (patch)
treefa33a6ffb2a7c385eefd019d31adaeecbbaed709 /sapi/apache2handler/sapi_apache2.c
parentb041abbb4e3d4772f84c61dea019a3bf2744ddbc (diff)
downloadphp-git-00b9392bf5fc116cfc3f6108805ca918180fcba2.tar.gz
Fixed bug #35571 (Fixed crash in Apache 2 SAPI when more then one php
script is loaded via SSI include).
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
-rw-r--r--sapi/apache2handler/sapi_apache2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 354e2b9c60..0a9ab08ac8 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -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)