diff options
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/cgi/cgi_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 9cc8d220a5..a3394a6b66 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -482,9 +482,14 @@ static void sapi_cgi_register_variables(zval *track_vars_array TSRMLS_DC) static void sapi_cgi_log_message(char *message) { #if PHP_FASTCGI + int logging = 1; TSRMLS_FETCH(); - if (!FCGX_IsCGI()) { + if (cfg_get_long("fastcgi.logging", &logging) == FAILURE) { + logging = 1; + } + + if (!FCGX_IsCGI() && logging) { FCGX_Request *request = (FCGX_Request *)SG(server_context); FCGX_FPrintF( request->err, "%s\n", message ); /* ignore return code */ |