]> granicus.if.org Git - php/commitdiff
MFH
authorfoobar <sniper@php.net>
Thu, 28 Apr 2005 13:14:55 +0000 (13:14 +0000)
committerfoobar <sniper@php.net>
Thu, 28 Apr 2005 13:14:55 +0000 (13:14 +0000)
php.ini-dist
php.ini-recommended
sapi/cgi/cgi_main.c

index fbc60b9dd09675e0797ade1c40b45ab1b97ed049..5ff6edde368bebed94543baa7be7b3571c6a6b57 100644 (file)
@@ -477,6 +477,9 @@ enable_dl = On
 ; Set to 1 if running under IIS.  Default is zero.
 ; fastcgi.impersonate = 1;
 
+; Disable logging through FastCGI connection
+; fastcgi.log = 0
+
 ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
 ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
 ; is supported by Apache. When this option is set to 1 PHP will send
index 216d3b8ae2bfc0737241c7354536ba859a2de1b2..df75d75b9c0c8fdec4b61644e7ae0c371d63d00e 100644 (file)
@@ -535,6 +535,9 @@ enable_dl = On
 ; Set to 1 if running under IIS.  Default is zero.
 ; fastcgi.impersonate = 1;
 
+; Disable logging through FastCGI connection
+; fastcgi.log = 0
+
 ; cgi.rfc2616_headers configuration option tells PHP what type of headers to
 ; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
 ; is supported by Apache. When this option is set to 1 PHP will send
index f06ac1a643190f0bbcf75aa8b0a537d9ba79bac9..be0faa0f697bf7d88f7575fd4325f1d00082ecd0 100644 (file)
@@ -482,9 +482,14 @@ static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC)
 static void sapi_cgi_log_message(char *message)
 {
 #if PHP_FASTCGI
+       int logging = 1;
        TSRMLS_FETCH();
 
-       if (!FCGX_IsCGI()) {
+       if (cfg_get_long("fastcgi.logging", &logging) == FAILURE) {
+               logging = 1;
+       }
+                                                                                                        
+       if (!FCGX_IsCGI() && logging) {
                FCGX_Request *request = (FCGX_Request *)SG(server_context);
                FCGX_FPrintF( request->err, "%s\n", message );
                /* ignore return code */