Before anyone points out "why use X version of PHP" here is a short rundown; TL:DR it's temporary, I have to.
The company I'm doing this "migration" for needs 5.3 with two sites that are running on an old in-house built CMS. The company split a while back and their side does not have the new CMS. These sites still need to be maintained until they can be taken off the CMS. At the same time they need 5.6 available to run their new sites. Yes I would have simply set up a virtual machine and installed 5.3 from the wheezy repo, but I cannot do that In this situation. Anyhow I'm running Debian Jessie and after compiling and installing 5.3.10, I attempted to get apache to use it via fast-cgi. I am however getting a 500 and the following error:
Request exceeded the limit of 10 internal redirects due to probable configuration error.
Traceback:
Here is my configuration:
Contents of /usr/lib/cgi-bin/php53-cgi
:
#!/bin/sh
PHPRC="/etc/php53/apache2/"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/bin/php53/php-cgi
Contents of /etc/apache2/php53.conf
:
SetHandler application/x-httpd-php5
ScriptAlias /php53-cgi /usr/lib/cgi-bin/php53-cgi
Action application/x-httpd-php5 /php53-cgi
AddHandler application/x-httpd-php5 .php
Finally in the vhost for the site:
<VirtualHost *:8080>
DocumentRoot /var/www/html
Include php53.conf
<Directory "/var/www/html">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Any help on this would be greatly appreciated, thanks.