Is it possible to have multiple versions of PHP installed on OS X Mountain Lion and freely change between them? Similar to the way MAMP allows you to. I'm wanting to get out of using MAMP and this is really the only feature holding me back.
Even if I may get downvotes for this answer, I think I have to post it for the benefit of the OP.
Surely there is a way to achieve what you want, but you will lose a lot of time.
I often develop web applications on my OSX box and guess what... I use a Debian virtual machine to test them on a Webserver. It's easier, faster, neater. I don't need MacPorts to install even four different versions of PHP, I can test all the pecl
extensions compiling them with a simple command. I can simulate any possible Linux server environment with just a few commands in the virtual machine console, without hacking the sources to make them work under OSX, and without screwing anything up.
For anyone wanting to do it with Homebrew: After successfully installing different versions of php (or any program versions) on can switch between them from the command line:
brew unlink php53 && brew link php54
Some more tips here: https://github.com/mxcl/homebrew/wiki/Tips-N%27-Tricks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With