As usual, the OSX/macOS update will delete your move your old config file.
I start with the new one and make the changes I want.
/etc/apache2/httpd.conf, uncomment the following:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
AllowOverride All for
To avoid the PEAR/PECL nightmare from last time, I want to use the Mongo PHP driver from Homebrew.
First, update to XCode 8 from App Store (4GB+ download!)
Then do this to read and agree to the license:
sudo xcodebuild -license
Homebrew then gives me a warning about the permissions of
/usr/local, which are fixed with this:
sudo chown -R $(whoami) /usr/local
BUT this is slightly desctructive. We need this for MySQL:
sudo chown -R _mysql:wheel /usr/local/mysql/data
Using Homebrew’s PHP and PHP-Mongo extension
We’re going to use Homebrew’s PHP rather than the system one.
brew install homebrew/php/php56 --with-apache
This apparently installed
httpd24, but I want to use the system’s Apache, so:
brew unlink httpd24
Then tell the system Apache use the Homebrew PHP. In
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
Some minor configuration for our Homebrew PHP.
date.timezone = "Europe/Stockholm"
Then we install the Mongo driver (note I want the old
mongo, not the newer
brew install homebrew/php/php56-mongo
Finally restart Apache:
sudo apachectl restart