Forum: NGINX Double logging via PHP FastCGI on Windows XP?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
604e194b0b23280a5447a0f31c78ae0b?d=identicon&s=25 Dan Dascalescu (Guest)
on 2009-03-26 06:28
(Received via mailing list)
In a PHP script, I have this statement:

    error_log("||here goes an error_log error||");

When I request the script from the web server, the nginx error log
shows the message twice:

2009/03/25 20:49:19 [error] 4380#0: *1 FastCGI sent in stderr: "||here
goes an error_log error||
||here goes an error_log error||" while reading response header from
upstream, client: 127.0.0.1, server: localhost, request: "POST
/script.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9123", host:
"127.0.0.1"

Does anyone know what's happening here? I'm not sure if the error is
with php-cgi.exe, or with nginx.


My nginx.conf is adapted from http://wiki.nginx.org/PHPFastCGIOnWindows:


worker_processes  1;
error_log  logs/error.log  notice;
events {
    worker_connections  64;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;

        location / {
            root   ../www;
            index  index.html index.htm;
            autoindex on;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # pass the PHP scripts to FastCGI server listening on
127.0.0.1:9000
        location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9123;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  c:/www$fastcgi_script_name;
            include        fastcgi_params;
        }

    }
}
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-03-26 08:12
(Received via mailing list)
On Wed, Mar 25, 2009 at 08:56:16PM -0700, Dan Dascalescu wrote:

> upstream, client: 127.0.0.1, server: localhost, request: "POST
> /script.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9123", host:
> "127.0.0.1"
>
> Does anyone know what's happening here? I'm not sure if the error is
> with php-cgi.exe, or with nginx.

The simple way to test it is to run nginx on Unix host. It seems there
were
no these issues on Unix installations.
This topic is locked and can not be replied to.