

Then add the following three items, pay attention to the address of libphp7.so, please write your own #Include /private/etc/apache2/other/*.conf This line #LoadModule php5_module libexec/apache2/libphp5.so Please read them carefully.Ĭomment out the following two sentences first

I put the information I put at the end of the article. Then uninstall the downloaded apache, the method isīrew uninstall //Uninstall the corresponding moduleīrew cleanup -s //Clear cache and old version files Here is a pit, -with-apache this to bring, otherwise the macos sierra system will not generate the corresponding libphp7.so module when installing php7
#Macos homebrew php7 redis install#
Here I install with the following optionsīrew install php70 -with-apxs2 -with-apache -with-gmp -with-imap -with-tidy -with-debug
#Macos homebrew php7 redis plus#
Please note: If you want to use apache as the web server under mac, add -with-apache when compiling if your web server is nginx, you need Plus -with-fpm. You can use the brew options php70 command to view the options for installing php. (In some places, using brew tap josegonzalez/homebrew-php or brew tap josegonzalez/php, I went to the warehouse of josegonzalez and looked at the warehouse of the homebrew of fork, so I think there are enough of the above two warehouses, so don't write osegonzalez The) Restart Apache: Run "sudo apachectl restart"Īpache log location /private/var/log/apache2/error_logĪpache configuration master file /etc/apache2/httpd-confĪpache vhost configuration /etc/apache2/extra/nfġ>Use brew doctor to check your brew operationĢ> Add brew's PHP extension library: (mac os is more discriminating against PHP, not including PHP packages, then we have to bind other people's git repository, usage is $ brew tap ) There are a lot of articles on the Internet that are wrong, because it is copying others, the author does not have his own pro-test, not only can not help the novice, but also produces serious misleading, the following introduction is my constant crawling, pro-test one available Tutorial, I hope to give you some help (Mac version is sierra), please indicate the sourceĬheck out Apache: version: run "sudo apachectl -v",
