sniper Thu Apr 28 09:14:26 2005 EDT Modified files: /php-src php.ini-dist php.ini-recommended /php-src/sapi/cgi cgi_main.c Log: - Added fastcgi.logging php.ini option to be able to disable logging through the fastcgi connection http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.227&r2=1.228&ty=u Index: php-src/php.ini-dist diff -u php-src/php.ini-dist:1.227 php-src/php.ini-dist:1.228 --- php-src/php.ini-dist:1.227 Sat Apr 2 18:04:02 2005 +++ php-src/php.ini-dist Thu Apr 28 09:14:25 2005 @@ -481,6 +481,9 @@ ; 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 http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.173&r2=1.174&ty=u Index: php-src/php.ini-recommended diff -u php-src/php.ini-recommended:1.173 php-src/php.ini-recommended:1.174 --- php-src/php.ini-recommended:1.173 Mon Apr 4 03:55:13 2005 +++ php-src/php.ini-recommended Thu Apr 28 09:14:25 2005 @@ -539,6 +539,9 @@ ; 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 http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.262&r2=1.263&ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.262 php-src/sapi/cgi/cgi_main.c:1.263 --- php-src/sapi/cgi/cgi_main.c:1.262 Mon Mar 14 14:25:39 2005 +++ php-src/sapi/cgi/cgi_main.c Thu Apr 28 09:14:26 2005 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.262 2005/03/14 19:25:39 rasmus Exp $ */ +/* $Id: cgi_main.c,v 1.263 2005/04/28 13:14:26 sniper Exp $ */ #include "php.h" #include "php_globals.h" @@ -482,9 +482,14 @@ 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 */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php