Q:

Best way to have both php 5.2 and php 5.3 at the same time in Ubuntu

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.

A:

Use this Ubuntu PPA https://launchpad.net/~skettler/+archive/php
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.

