]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #32587 (Apache2: errors sent to error_log do not include timestamps)
authorfoobar <sniper@php.net>
Fri, 8 Apr 2005 20:34:03 +0000 (20:34 +0000)
committerfoobar <sniper@php.net>
Fri, 8 Apr 2005 20:34:03 +0000 (20:34 +0000)
# Also nuked the deprecated APLOG_NOERRNO's

NEWS
sapi/apache2filter/sapi_apache2.c
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index 9f2c1a56c945bf49931f9d197a699b063ffaffa8..59b6ddebb885436ecc00d3de8866e9944336f0cf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@ PHP                                                                        NEWS
 - Fixed bug #32591 (ext/mysql: Unsatisfied symbol: ntohs with HP-UX). (Jani)
 - Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).
   (Ilia)
+- Fixed bug #32587 (Apache2: errors sent to error_log do not include
+  timestamps). (Jani)
 - Fixed bug #32560 (configure looks for incorrect db2 library). (Tony)
 - Fixed bug #32553 (mmap loads only the 1st 2000000 bytes on Win32). (Ilia)
 - Fixed bug #32533 (proc_get_status() returns the incorrect process status). (Ilia)
index 17a302b079988d1006b7c78189df73dacb25e931..178e32bb374c264a24d858787a706bd372337eef 100644 (file)
@@ -272,18 +272,10 @@ 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_NOERRNO | APLOG_STARTUP,
-                                        0, NULL, "%s", msg);
-       }
-       else {
-               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO | APLOG_STARTUP,
-                                        0, ctx->r->server, "%s", msg);
+               ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_STARTUP, 0, NULL, "%s", msg);
+       } else {
+               ap_log_error(APLOG_MARK, APLOG_ERR, 0, ctx->r->server, "%s", msg);
        }
 }
 
@@ -356,7 +348,7 @@ static int php_input_filter(ap_filter_t *f, apr_bucket_brigade *bb,
 
        ctx = SG(server_context);
        if (ctx == NULL) {
-               ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, f->r,
+               ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
                                         "php failed to get server context");
                return HTTP_INTERNAL_SERVER_ERROR;
        }
@@ -467,7 +459,7 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
        
        ctx = SG(server_context);
        if (ctx == NULL) {
-               ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, f->r,
+               ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
                                         "php failed to get server context");
                zend_try {
                        zend_ini_deactivate(TSRMLS_C);
@@ -636,7 +628,7 @@ static void php_add_filter(request_rec *r, ap_filter_t *f)
        /* for those who still have Set*Filter PHP configured */
        while (f) {
                if (strcmp(f->frec->name, "PHP") == 0) {
-                       ap_log_error(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO,
+                       ap_log_error(APLOG_MARK, APLOG_WARNING
                                     0, r->server,
                                     "\"Set%sFilter PHP\" already configured for %s",
                                     output ? "Output" : "Input", r->uri);
index 874a5380dc85fbf88a72aec5ce95ed5cd69c486d..785f8647fcb058d8879a8cf18c43c2319d279c46 100644 (file)
@@ -264,22 +264,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);
        }