I have a site running PHP 5.2.17 (the PHP version is non-negotiable for various reasons, technical and policy) with fcgi. This version of PHP was installed through PHPFarm so that I could run other versions of PHP on different subdomains on this server.
Not every page in the site works, unfortunately. I'm getting the following Apache error for some of them:
End of script output before headers: php-cgi-5.2.17
You can see the phpinfo() file here for reference.
Here is the code for /etc/httpd/conf.d/x-pcit-le-ssl.conf:
<VirtualHost *:443>
ServerName pcit.extensiononline.ucdavis.edu
DocumentRoot /var/www/vhosts/pcit
<Directory "/var/www/vhosts/pcit">
Options +ExecCGI
SSLOptions +StdEnvVars
AddHandler fcgid-script .php
Action php-cgi /php-fcgi/php-cgi-5.2.17
<FilesMatch "\.php$">
SetHandler php-cgi
</FilesMatch>
</Directory>
RewriteEngine on
# Certificate info here #
ErrorLog /var/log/httpd/pcit.error.log
</VirtualHost>
And here is the code for /var/www/cgi-bin/php-cgi.5.2.17:
#!/bin/sh
version="5.2.17"
PHPRC=/opt/phpfarm/inst/php-${version}/lib/php.ini
export PHPRC
PHP_FCGI_CHILDREN=3
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=50000
export PHP_FCGI_MAX_REQUESTS
# which php-cgi binary to execute
exec /opt/phpfarm/inst/php-${version}/bin/php-cgi
suexec is installed. Here is the directory listing:
-rwsr-xr-x 1 root apache 14368 Jan 19 08:56 /usr/sbin/suexec*
The server is running Amazon Linux AMI, which I understand is similar to RH 7.
I've Googled and Googled for hours and my fingers are sore. I've found a few pages that deal with this issue, and they seem to indicate problems with fcgi, but I am not sure how to configure it properly. I've found the Apache page for mod_fcgid, but nothing there seems relevant.
I'm relatively new to this level of server administration, so any help anyone can offer would be more than appreciated. Thanks in advance.