A few years ago I had written a blog post on setting up an Apache, MySQL and PHP web server on macOS. Many things have changed ever since and that tutorial became impossible to follow. Meanwhile my standard fallback local server, MAMP, has become too unstable and lagging behind the times to be practical. Other blog posts I read seem to be glossing over some details. So here you go, a tutorial on running a local Apache, MySQL, multiple PHP versions server on macOS Mojave using HomeBrew, updated for 2019. Bonus points: you can change the PHP version using the site’s .htaccess like you would on most live hosts. Read more “Custom Apache and PHP server on macOS, the definitive 2019 edition”
My last week’s blog post on running Apache, MySQL, PHP server on Windows with multiple, simultaneous PHP versions seems to have been a smash hit. This week we’ll be doing the same thing on Mac OS X. For those of you who didn’t click the link, I decided it would be a cool, geeky project to implement an Apache-MySQL-PHP web server without using a pre-packaged server like MAMP or Zend Server. My goal was to have the same sites run under different versions of PHP by just visiting a different URL on my browser. This makes cross-PHP testing of sites a piece of cake.
I just bought an Intel NUC (Next Unit of Computing) mini-PC to serve as my secondary, Windows-powered development machine (the primary is an Apple Mac Mini). I decided it would be a fun* weekend project to implement an Apache-MySQL-PHP web server without using a pre-packaged server like XAMPP, WAMPServer etc. My goal was to have the same sites run under different versions of PHP by just visiting a different URL on my browser.
* for extremely geek values of “fun”