From: foobar Date: Mon, 10 Jan 2005 15:38:50 +0000 (+0000) Subject: - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). X-Git-Tag: php-5.0.4RC1~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae546e85b889a452fade5305ea327d0dafd29a53;p=php - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). (chris at ex-parrot dot com) --- diff --git a/NEWS b/NEWS index 0c0216dbe9..b98ffe45f3 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,9 @@ PHP NEWS path of the request URI). (kameshj at fastmail dot fm) - Fixed bug #28930 (PHP sources pick wrong header files generated by bison). (eggert at gnu dot org, Jani) - +- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). + (chris at ex-parrot dot com) + 15 Dec 2004, PHP 5.0.3 - Added the %F modifier to *printf to render a non-locale-aware representation of a float with the . as decimal seperator. (Derick) diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index e2028d36ca..1c84e5f3cf 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -481,6 +481,13 @@ static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) static void sapi_cgi_log_message(char *message) { +#if PHP_FASTCGI + if (!FCGX_IsCGI()) { + FCGX_Request *request = (FCGX_Request *)SG(server_context); + FCGX_FPrintF( request->err, "%s\n", message ); + /* ignore return code */ + } else +#endif /* PHP_FASTCGI */ fprintf(stderr, "%s\n", message); }