Apache does not work with osx 10.10 php homebrew

I want to use the built-in apache osx with the php version from homebrew. If I modify / etc / apache 2 / httpd.conf to load php homebrew, then no site is accessible even to localhost.

LoadModule php5_module /usr/local/Cellar/php55/5.5.13/libexec/apache2/libphp5.so

The apachectl state tells me that apache is running. It works if I use the default path. Do you have any suggestions to solve this problem?

+4
source share
3 answers

I had the same problem. Homebrew added

LoadModule php5_module local/Cellar/php56/5.6.8/libexec/apache2/libphp5.so

to httpd.conf . I changed this line to

LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so

and restart apache. It works for me

+2
source

, libphp5.so homebrew homebrew Apache, , OS X, Apache. , , Homebrew Apache - Homebrew ( , MAMP, ..).

+1

As shevron already reported, you need to get rid of the built-in apache and brew apache from homebrew and reinstall (or "ref brew") php, and then

brew install -v php55 --homebrew-apxs --with-apache

Follow this detailed guide:

https://echo.co/blog/os-x-109-local-development-environment-apache-php-and-mysql-homebrew

0
source

All Articles