Possible Duplicate:
linux: one apache two php versions. possible?!
I was asked in an interview.
How can we set up two different php version ex:php v 5.0 and php v 5.3 in a single machine?
Is it possible to do it with apache?
Thank
Possible Duplicate:
linux: one apache two php versions. possible?!
I was asked in an interview.
How can we set up two different php version ex:php v 5.0 and php v 5.3 in a single machine?
Is it possible to do it with apache?
Thank
Yes just about, at least one needs to be compiled from source and installed to a different location (linux assumed) and you cannot run both as apache modules (mod_php/DSO) at the same time
Then you can run one as an apache module (DSO) and one as FastCGID and then in the vhost you configure what you want the site to use - note that i haven't gone through specific instruction steps for these - there is a good guide here if you are interested: http://www.metod.si/multiple-php-versions-with-apache-2-fastcgi-phpfarm-on-ubuntu/
I wouldn't really recommend it though as it does open you up to security issues of managing 2 seperate php installs, especially if one of them is an older version of php.
Sure, you can do it with something like this:
--prefix
)