【问题标题】:libexec not showing on folder after installation安装后 libexec 未显示在文件夹中
【发布时间】:2018-03-02 16:09:27
【问题描述】:
我无法在 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
【问题讨论】:
标签:
php
macos
apache
macos-sierra
【解决方案1】:
我在这里发布我的解决方案:
$ 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