强制Apache2使用Homebrew的php56 [英] Forcing Apache2 to use php56 from Homebrew
问题描述
所以我从
brew reinstall php56 --with-apache
这很好用,然后我将httpd.conf
修改为
This worked fine I then amended httpd.conf
to include
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
但是在使用PHP 5.6.24对phpinfo
进行检查时,这是错误的,那就是MacOS本机版本.酿造版本为5.6.26.
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.
由于某种原因,我的Apache2配置被忽略了-或我修改了错误的文件.我在/etc/apche2/httpd.conf
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.
推荐答案
事实证明,我正在重新启动apache,但是它不能正常工作.
I was restarting apache, but it was not working it turns out.
重新启动我的整个计算机可以正常工作,然后Apache使用了正确版本的PHP.
Restarting my whole machine did work and apache then used the correct version of PHP.
显然,killall httpd
也具有相同的效果.尽管我还没有尝试过.
Apparently killall httpd
has the same effect too. Although I have not tried that.
这篇关于强制Apache2使用Homebrew的php56的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!