]> granicus.if.org Git - php/commitdiff
MFH: - Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
authorfoobar <sniper@php.net>
Mon, 10 Jan 2005 15:39:20 +0000 (15:39 +0000)
committerfoobar <sniper@php.net>
Mon, 10 Jan 2005 15:39:20 +0000 (15:39 +0000)
NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index ab047e98a526e546fc551479caaf67ad39049562..8ffa964c6b9c64ed119a4a2527ab26ab377da00c 100644 (file)
--- 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
index ba5c7051c007cfb772732578d7f8827fb381a023..36ecac1c9b4d7e413785410e16ca307f38ca20cf 100644 (file)
@@ -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);
 }