Setting up Apache + PHP + MySQL on OSX with Homebrew

9 thoughts on “Setting up Apache + PHP + MySQL on OSX with Homebrew”

  1. So, I’ve followed all these steps and everything looks to be in place. However, when I enter “apachectl start” as best I can tell, its still the native OS X copy of apache thats running. Is this a PATH issue? Greatful for any help you can offer.


    1. Paul you are probably missing something like this in your .bash_profile:

      Notice the added /usr/local paths. I don’t remember if brew does this automatically, specially the sbin path.

      Restart your terminal and try again, you can see which version is being used with:
      which apachectl


  2. Thanks for this!

    I had to install php with `–homebrew-apxs` to avoid the following cryptic error when starting apache:

    httpd: Syntax error on line 117 of /usr/local/etc/apache2/2.2/httpd.conf: Cannot load /usr/local/Cellar/php56/5.6.3/libexec/apache2/ into server: dlopen(/usr/local/Cellar/php56/5.6.3/libexec/apache2/, 10): Symbol not found: _ap_unixd_config\n Referenced from: /usr/local/Cellar/php56/5.6.3/libexec/apache2/\n Expected in: /usr/local/Cellar/httpd22/2.2.29/bin/httpd\n in /usr/local/Cellar/php56/5.6.3/libexec/apache2/


Comments are closed.