Multiple php version in apache

Vincenzo asked:

I have an Apache 2.2.3 installation with default php (installed as a module) 5.1.6, on a CentOS distribution. Php and Apache were installed using yum install command.
My document root is located under var/www/html folder.
I have now to install a new website that requires Php 5.3 +; but i can’t simply upgrade current php installation, else all current websites will break.

I downloaded and compiled php 5.4.4 and installed. It works too using it’s built in web server.

I would like now to create a folder var/www/html/myfolder in which Php 5.4.4 should be used. All other websites should continue to use php 5.1.6; but really i do not know how to make this.

My answer:

You can install PHP 5.3 on your existing CentOS 5 system by using the vendor-provided php53-* packages instead of the corresponding php-* packages.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.