sniper Thu Apr 28 09:14:46 2005 EDT Modified files: (Branch: PHP_4_3) /php-src php.ini-dist php.ini-recommended /php-src/sapi/cgi cgi_main.c Log: MFH http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.171.2.27&r2=1.171.2.28&ty=u Index: php-src/php.ini-dist diff -u php-src/php.ini-dist:1.171.2.27 php-src/php.ini-dist:1.171.2.28 --- php-src/php.ini-dist:1.171.2.27 Sat Apr 2 18:04:41 2005 +++ php-src/php.ini-dist Thu Apr 28 09:14:45 2005 @@ -463,6 +463,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.119.2.24&r2=1.119.2.25&ty=u Index: php-src/php.ini-recommended diff -u php-src/php.ini-recommended:1.119.2.24 php-src/php.ini-recommended:1.119.2.25 --- php-src/php.ini-recommended:1.119.2.24 Sat Apr 2 18:04:41 2005 +++ php-src/php.ini-recommended Thu Apr 28 09:14:46 2005 @@ -478,6 +478,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.190.2.66&r2=1.190.2.67&ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.66 php-src/sapi/cgi/cgi_main.c:1.190.2.67 --- php-src/sapi/cgi/cgi_main.c:1.190.2.66 Thu Feb 10 21:12:30 2005 +++ php-src/sapi/cgi/cgi_main.c Thu Apr 28 09:14:46 2005 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.190.2.66 2005/02/11 02:12:30 sniper Exp $ */ +/* $Id: cgi_main.c,v 1.190.2.67 2005/04/28 13:14:46 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