I've been trying to setup my development server to serve one of my Apache virtual hosts over CGI using PHP 5.3.14.
The Apache server I have setup is Apache 2.2.3 with PHP 5.2.10 running as an Apache module. CentOS 5.5 is the OS. One of the sites uses features only available in PHP 5.3, and I have sites that need 5.2, so I'd like to run only the site that need PHP 5.3 on over CGI.
I've followed a couple tutorials to the point where I have Apache/PHP 5.2 installed and working as a module. I also downloaded and compiled PHP 5.3.14 successfully to the point where I have the php-5.3.14/sapi/cgi/php-cgi executable built and ready to go. If I run it with a script it works correctly. However, after having added what I think are the correct directives to the VirtualHost, the site still is not using PHP 5.3, it continues to work, using PHP 5.2 (the version setup as an Apache module).
Here is my Vhost config:
<VirtualHost *:80>
ServerName utfl.peapoddev.com
ServerAlias elegal.utfl.peapoddev.com subsite.utfl.peapoddev.com library.utfl.peapoddev.com
DocumentRoot /var/www/utfl/drupal
DirectoryIndex index.html index.php
SetEnv PHPRC /var/www/cgi-bin/php_5_3_14/
ScriptAlias /php-5-3-14/ /var/www/cgi-bin/php_5_3_14/
Action application/x-httpd-php-5-3-14 /php-5-3-14/php-cgi
AddType application/x-httpd-php-5-3-14 .php .inc
<Directory "/var/www/cgi-bin/php_5_3_14">
<Files "php-cgi">
Allow from all
</Files>
</Directory>
<Directory "/var/www/utfl/drupal">
Options Indexes Includes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AllowOverride All
</Directory>
LogLevel Debug
ErrorLog /var/www/utfl/logs/error_log
CustomLog /var/www/utfl/logs/access_log combined
Let me know if you need more info. What am I doing wrong?
Best Answer
I have been using the following configuration on CentOS-5.9
php-5.3 was configured with following options