summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--sapi/cgi/cgi_main.c7
2 files changed, 10 insertions, 1 deletions
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);
}