Forcing Apache2 to use php56 from Homebrew

孤者浪人 提交于 2019-12-04 05:04:09

问题


So I started with

brew reinstall php56 --with-apache

This worked fine I then amended httpd.conf to include

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

But upon inspection of phpinfo its using PHP 5.6.24 which is wrong, thats the MacOS native version. The brew version is 5.6.26.

For some reason my Apache2 config is being ignored - or I have amended the wrong file. The one I changed as in /etc/apche2/httpd.conf

This is a follow on from my previous question related to getting APCu working. Its working for the brew version of PHP but is not working for the the native PHP version. Therefore I want to force Apache2 to use the brew version with APCu.


回答1:


I was restarting apache, but it was not working it turns out.

Restarting my whole machine did work and apache then used the correct version of PHP.

Apparently killall httpd has the same effect too. Although I have not tried that.



来源:https://stackoverflow.com/questions/39721251/forcing-apache2-to-use-php56-from-homebrew

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!