Flexible PHP-Development-Setup on MacOS X with Homebrew

Many (all?) php developers face the challenge that they have to test their work using different PHP versions. For MacOSX 10.10 Yosemite I found a  real simple solution that is setup in within about hour (excluding compile time 😉 ) Thanks to Tobias Liebig (@etobi auf Twitter) I came across the very good and well thought blog post of Alan Ivey about his php development setup on MacOSX. Until a couple of days ago I had a rather similar setup except the following features: homebrew based apache server auto virtual host feature for apache php installation using fpm The really cool thing of this setup is that you can create / use virtual hosts and switch php versions without touching the apache and / or php configuration! I can only recommend this setup. While installing I came across two small glitches: If you are switching from a mod_php- and homebrew-based installation, you must uninstall and remove every prior php installation and install all php versions from scratch. Otherwise the usage with fpm will not work. I recommend to compile and install all available php versions, as it is quite simple to switch between them at any time later. The “mysql”-database in version 5.6 together with MacOS X 10.10 (Yosemite) may cause some headaches, resulting in the error: “Lost connection to MySQL server at ‘sending authentication information’, system error: 32”.  The reason seem to be the...

Read More