Connection reset by peer: mod_fcgid: error reading data from FastCGI server
I had very similar errors in the Apache2 log files:
(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI serverPremature end of script headers: phpinfo.php
After checking the wrapper scripts and Apache2 settings, I realized that /var/www/ did not have accordant permissions. Thus the FCGId Wrapper scripts could not be read at all.
ls -la /var/wwwdrwxrws--- 5 www-data www-data 4096 Oct 7 11:17 .
For my scenario chmod -o+rx /var/www
was required of course, since the used SuExec users are not member of www-data
user group - and they should not be member for security reasons of course.
if you want to install a PHP version < 5.3.0, you must replace
--enable-cgi
with:
--enable-fastcgi
in your ./configure
statement, excerpt from the php.net doc:
--enable-fastcgi
If this is enabled, the CGI module will be built with support for FastCGI also. Available since PHP 4.3.0
As of PHP 5.3.0 this argument no longer exists and is enabled by --enable-cgi instead. After the compilation the ./php-cgi -v
should look like this:
PHP 5.2.17 (cgi-fcgi) (built: Jul 9 2013 18:28:12)Copyright (c) 1997-2010 The PHP GroupZend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
NOTICE THE (cgi-fcgi)