Rob Schultz
February 07, 2010 01:54PM
> So, still searching for the culprit that doesn't close the connection to browser when Content-Length is reached... :) Any ideas?
>
> Or is this a FastCGI issue? Is there any other way to use PHP with NginX?

I believe this is a FastCGI issue. And nginx buffer's the FastCGI response until FastCGI request is completed. The Header("Connection: close"); is only used to prevent using Keep-alive connection. It tells the browser to terminate the connection and not keep them open, thus having no effect on when the data gets to the client.

A suggestion that might work as your needing is stripping your apache down to only using mod_php and anything else you might want. and basically use it as a PHP process manager. Then you can just proxy your requests to apache for the php requests and turn proxy_buffering off http://wiki.nginx.org/NginxHttpProxyModule#proxy_buffering which then *should* produce the results you require. This allow you to use nginx for your static resources while just utilizing apache as just a PHP manager.

v/r,
Rob
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

FastCGI PHP - unable to prematurely close connection to browser

cactus February 06, 2010 05:00AM

Re: FastCGI PHP - unable to prematurely close connection to browser

Hoang Hoang February 06, 2010 10:32AM

Re: FastCGI PHP - unable to prematurely close connection to browser

cactus February 07, 2010 06:30AM

Re: FastCGI PHP - unable to prematurely close connection to browser

Rob Schultz February 07, 2010 12:08PM

Re: FastCGI PHP - unable to prematurely close connection to browser

Reinis Rozitis February 08, 2010 06:42AM

Re: FastCGI PHP - unable to prematurely close connection to browser

cactus February 14, 2010 09:28AM

Re: FastCGI PHP - unable to prematurely close connection to browser

cactus February 07, 2010 01:30PM

Re: FastCGI PHP - unable to prematurely close connection to browser

Rob Schultz February 07, 2010 01:54PM

Re: FastCGI PHP - unable to prematurely close connection to browser

cactus February 07, 2010 02:48PM

Re: FastCGI PHP - unable to prematurely close connection to browser

Tobia Conforto February 08, 2010 04:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 130
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