summaryrefslogtreecommitdiff
path: root/sapi/apache2handler
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:37 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:34:37 -0400
commit10f5b47dc7c1cf2b9a00991629f43652710322d3 (patch)
tree3b727a16f652b8042d573e90f003868ffb3b56c7 /sapi/apache2handler
parent0e920280a2e04b110827bb766b9f29e3d581c4ee (diff)
downloadphp-upstream/5.0.5.tar.gz
Imported Upstream version 5.0.5upstream/5.0.5
Diffstat (limited to 'sapi/apache2handler')
-rw-r--r--sapi/apache2handler/apache_config.c4
-rw-r--r--sapi/apache2handler/sapi_apache2.c21
2 files changed, 12 insertions, 13 deletions
diff --git a/sapi/apache2handler/apache_config.c b/sapi/apache2handler/apache_config.c
index a863d0730..505104718 100644
--- a/sapi/apache2handler/apache_config.c
+++ b/sapi/apache2handler/apache_config.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: apache_config.c,v 1.5 2004/01/08 08:18:05 andi Exp $ */
+/* $Id: apache_config.c,v 1.5.2.1 2005/07/04 12:47:26 dmitry Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -166,7 +166,7 @@ void apply_config(void *dummy)
zend_hash_move_forward(&d->config)) {
zend_hash_get_current_data(&d->config, (void **) &data);
phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
- if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, PHP_INI_STAGE_RUNTIME) == FAILURE) {
+ if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, PHP_INI_STAGE_ACTIVATE) == FAILURE) {
phpapdebug((stderr, "..FAILED\n"));
}
}
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 7a3721aaa..707e73c53 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.40.2.7 2005/03/10 11:23:57 jorton Exp $ */
+/* $Id: sapi_apache2.c,v 1.40.2.11 2005/09/02 13:51:26 sniper Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -112,9 +112,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_stru
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
}
- sapi_free_header(sapi_header);
-
- return 0;
+ return SAPI_HEADER_ADD;
}
static int
@@ -264,22 +262,17 @@ static void php_apache_sapi_log_message(char *msg)
ctx = SG(server_context);
- /* We use APLOG_STARTUP because it keeps us from printing the
- * data and time information at the beginning of the error log
- * line. Not sure if this is correct, but it mirrors what happens
- * with Apache 1.3 -- rbb
- */
if (ctx == NULL) { /* we haven't initialized our ctx yet, oh well */
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
} else {
- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, ctx->r, "%s", msg);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, ctx->r, "%s", msg);
}
}
static void php_apache_sapi_log_message_ex(char *msg, request_rec *r)
{
if (r) {
- ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, r, msg, r->filename);
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, msg, r->filename);
} else {
php_apache_sapi_log_message(msg);
}
@@ -513,6 +506,7 @@ zend_first_try {
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
@@ -529,6 +523,11 @@ zend_first_try {
}
} else {
parent_req = ctx->r;
+ /* check if comming due to ErrorDocument */
+ if (parent_req && parent_req->status != HTTP_OK) {
+ parent_req = NULL;
+ goto normal;
+ }
ctx->r = r;
brigade = ctx->brigade;
}