News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Till Klampaeckel' Blog:
PHP parse errors with cgi and nginx
March 16, 2010 @ 11:18:59

Till Klampaeckel has a very quick post about a problem he was coming across when using PHP as a CGI on the nginx web server. It was throwing errors ("client prematurely closed connection...") with no evident cause.

The issue was a PHP parse error which I overlooked when I added a new file. The weird thing is, I had nothing in the logs (E_ALL, display_errors is off, but all logs are enabled and I tailed them using multitail) and nginx only displayed a blank page. The errors above were in nginx's own log file.

The multitail command lets you run the "tail" command on more than one file at a time and view them split out in your console for easier reference. The full error message reads:

client closed prematurely connection, so upstream connection is closed too while sending request to upstream, client: a.a.a.a, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/.fastcgi.till/socket:", host: "localhost"
0 comments voice your opinion now!
nginx parse error multitail debug


blog comments powered by Disqus

Similar Posts

Nexen.net: Error Messages in PHP (a Search)

Christopher Kunz's Blog: Warning about the article "SQL Injection" in current "PHP Magazin"

Developer Tutorials Blog: Debugging CakePHP applications in Zend Studio for Eclipse

International PHP Magazine: Poll Question: Features a PHP Editor Should Possess

Slawek Lukasiewicz's Blog: Throwing Exception with Type Hinting Failed


Community Events

Don't see your event here?
Let us know!


example voicesoftheelephpant api performance podcast series version conference community laravel introduction symfony2 library php7 release opinion interview extension framework application

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework