I am developing for a lot of sites on my small local machine. A number of individuals sites ultimately operate on php5.3, plus some operate on php5.2. It is possible to way I'm able to setup virtual hosts to make use of different versions of php for every?
You need to have the ability to by hand compile both versions of PHP to split up sites and setup PHP with FastCGI for every website. FastCGI provides you with comparible performance to mod_php on apache.
You might set each one of these track of CGI. Its a great deal reduced, however you cannot observe how modules like APC can help your code or used shared memory or persistent connections reliable (they are effective for starters request)
In the event that does not work, you may make another install of the webserver, configure it to operate on the different port, after which setup your other webserver to do something like a proxy, sending demands to some specific virtual host towards the other webserver.
I'm make use of a denwer. It's a local server. Denwer could be installed many occasions on a single machine or USB. I've 2 denwers on my small computer. One with php 5.2. Second with php 5.3.
Either you need to do according to the above mentioned and employ different versions of PHP using FastCGI in your machine. Consider it's for development, you might use ie. VirtualBox or VMware server and make 2 virtual machines, one with PHP 5.2 and something with 5.3 (or you might create much more, one per project - that's the way i would get it done actually :p).
Possible benefits : you could utilize the OS - and also the same software versions of ie. apache / mysql - that's utilized on your exterior host (this is exactly why I'd prefer one VM per project). This may be also advantageous when debugging afterwards.
You could attempt to operate php as cgi. I'm not sure whether it works, you need to pass different php.ini locations towards the cgi for such things as different temp dirs. Wouldn't recommend it on the production machine.