我无法在apache上加载php71模块,因为当我访问该文件夹时它不存在“libexec”文件夹,无法理解什么是错误的。已安装并重新安装......任何人都有同样的问题?我正在研究macOS
我的道路是:
usr/local/opt/php71/
里面的文件夹是:
INSTALL_RECEIPT.json
README.md
include
sbin
LICENSE
bin
lib
share
NEWS
homebrew.mxcl.php71.plist
php
var
我在这里发布我的解决方案
$ brew uninstall --force php71
$ brew uninstall --force httpd24
$ brew cleanup
$ brew doctor # fix anything that pops up
$ brew install httpd24
$ which httpd24 # should be the Cellar one, if not, brew link httpd24 / troubleshoot
$ brew install --with-httpd24 php71 # or --with-apache, both may work
$ php -v # should be 7.1.x
$ brew unlink httpd24
在你的httpd.conf中添加:
LoadModule php7_module /usr/local/opt/php71/libexec/apache2/libphp7.so
对于更新记住(除非你实际使用brew-apache;)):
$ brew link httpd24
$ # brew-php-switcher _version-that-needs-update_ # in case you use it
$ brew upgrade
$ brew unlink httpd24