Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm hosting several websites in a single directory, using Apache virtualHosts. Some of them need PHP 5.2 and others are fine with PHP 5.3. How can I specify which directories use each version and how do I use multiple versions of PHP on one system?

share|improve this question
up vote 6 down vote accepted

You would have to run PHP in CGI mode versus as a module for Apache (or atleast the 2nd, 3rd, ..., nth versions).

Here's a fantastic how-to I found on the web for it:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.