]> granicus.if.org Git - php/commitdiff
Added log_message function to the FastCGI sapi, so you can see error
authorBen Mansell <joosters@php.net>
Fri, 4 Jan 2002 14:39:46 +0000 (14:39 +0000)
committerBen Mansell <joosters@php.net>
Fri, 4 Jan 2002 14:39:46 +0000 (14:39 +0000)
output from scripts

sapi/fastcgi/fastcgi.c

index 3eb45873d9d37d7672574f55ac6bb1e5f4cd1ed6..8926eac85089066a036ce00fc27386d5ff82412b 100644 (file)
@@ -163,6 +163,15 @@ static void sapi_fastcgi_register_variables(zval *track_vars_array TSRMLS_DC)
 }
 
 
+static void sapi_fastcgi_log_message(char *message)
+{
+#ifdef DEBUG_FASTCGI
+       fprintf( stderr, "Log Message: %s\n", message );
+#endif
+       FCGX_FPrintF(err, "%s\n", message);
+}
+
+
 static sapi_module_struct fastcgi_sapi_module = {
        "fastcgi",
        "FastCGI",
@@ -187,7 +196,7 @@ static sapi_module_struct fastcgi_sapi_module = {
        sapi_fastcgi_read_cookies,
 
        sapi_fastcgi_register_variables,
-       NULL,                                                                   /* Log message */
+       sapi_fastcgi_log_message,
 
        NULL,                                                                   /* Block interruptions */
        NULL,                                                                   /* Unblock interruptions */