From: foobar Date: Mon, 10 Jan 2005 15:39:20 +0000 (+0000) Subject: MFH: - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). X-Git-Tag: php-4.3.11RC1~177 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a28c3b94af9e5ab50696e3becc17295881ef75e;p=php MFH: - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). --- diff --git a/NEWS b/NEWS index ab047e98a5..8ffa964c6b 100644 --- a/NEWS +++ b/NEWS @@ -25,6 +25,8 @@ PHP 4 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) +- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream). + (chris at ex-parrot dot com) - Fixed bug #7782 (Cannot use PATH_INFO fully with php isapi). (Unknown) 15 Dec 2004, Version 4.3.10 diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index ba5c7051c0..36ecac1c9b 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); }