]> granicus.if.org Git - php/commitdiff
- Fixed bug #28074 (FastCGI: stderr should be written in a FCGI stderr stream).
authorfoobar <sniper@php.net>
Mon, 10 Jan 2005 15:38:50 +0000 (15:38 +0000)
committerfoobar <sniper@php.net>
Mon, 10 Jan 2005 15:38:50 +0000 (15:38 +0000)
  (chris at ex-parrot dot com)

NEWS
sapi/cgi/cgi_main.c

diff --git a/NEWS b/NEWS
index 0c0216dbe996cbfa0a6046223d7e2dcc10e9c80d..b98ffe45f3d63fe43c27ceadd46a81cb6132d5f2 100644 (file)
--- 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)
index e2028d36ca511d426800940882a5c0eee07aea03..1c84e5f3cf0894e4a713f07c167a8ce4d42f4221 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);
 }