Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am using Ubuntu 12.04. I need (this is not an option) to have both php 5.2 and php 5.3 installed. I think I need to compile 5.2 from source and keep it in /usr/local or make checkinstall.

Is there any better way? How would you do this? Are there any official repositories with php52 for Ubuntu?

Note: I need php-fpm with my 5.2 too, so binary versions without fpm patch won't help me.

share|improve this question
up vote 1 down vote accepted

Use this Ubuntu PPA

With this you can install php52 and php53, and their individual modules.

To configure with apache, use FastCGI and/or FPM. You could use mod_php for one, and fastcgi for the other, but I'd just assume use FastCGI for both of them.

share|improve this answer

Use separate virtual machines: Place the ancient legacy software in a VM running PHP 5.2, probably on Ubuntu 10.04, while you run the modern software on PHP 5.3 on Ubuntu 12.04.

And then, of course, get rid of the ancient legacy software as quickly as you can...

share|improve this answer

Install one whit apt-get and orther one you can install from source on orther path, or install both versions from source, is the same result.

Ispconfig use 2 or more php versions maybe you can check their tutorials, are very help ful

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.