Can I run PHP 5.3 and PHP 5.2 on the same server with Apache?

I just curious if there's a way I can set up my development box so that I can have some sites running PHP 5.3 and some with PHP 5.2, and that I can switch between them fairly painlessly.


Check out: https://stackoverflow.com/questions/524508/how-can-one-run-multiple-versions-of-php-5-x-on-a-development-lamp-server


Looking at the solutions offered in that link, I vastly prefer using the same Apache instance on the same port and just overriding the handler. For details, see my blog post.


suPHP is another way to run multiple versions on the same webserver. We do it and map .php/.php5 to PHP5, then .php4 to PHP4. Overrides are also allowed by users on a per-directory basis by changing the handler in their php.ini file.