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.

link|improve this question
feedback

5 Answers

up vote 5 down vote accepted

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

link|improve this answer
Wow... wish that would have shown up in the "has this question already been asked" dialog... – ironkeith Feb 23 '10 at 20:04
feedback

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.

link|improve this answer
feedback

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.

link|improve this answer
feedback

Yes you can! In the past I've install PHP 5.x from my distribution packages, then downloaded and compiled PHP 5.y from source. Then in Apache you load both modules and just overwrite the file handlers when you want to switch versions - which can even be done in .htaccess files.

link|improve this answer
feedback

i found great installation instruction in this blog, found worked for me, i didnt found any post problem related to it http://www.discusswire.com/running-php-5-2-5-3-server/

link|improve this answer
-1 Nice find, but it's for Nginx. The Question is very clear, they're looking for PHP in Apache. – Chris S Apr 16 at 12:45
feedback

Your Answer

 
or
required, but never shown

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