Welcome! Log In Create A New Profile

Advanced

Re: Double logging via PHP FastCGI on Windows XP?

March 26, 2009 02:58AM
On Wed, Mar 25, 2009 at 08:56:16PM -0700, Dan Dascalescu wrote:

> 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.

The simple way to test it is to run nginx on Unix host. It seems there were
no these issues on Unix installations.

> 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;
> }
>
> }
> }

--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Double logging via PHP FastCGI on Windows XP?

Dan Dascalescu March 25, 2009 11:56PM

Re: Double logging via PHP FastCGI on Windows XP?

Igor Sysoev March 26, 2009 02:58AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready