Skip to content

Instantly share code, notes, and snippets.

@hndr91
Last active June 2, 2018 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hndr91/533e9c63de3086374640b61b2304c898 to your computer and use it in GitHub Desktop.
Save hndr91/533e9c63de3086374640b61b2304c898 to your computer and use it in GitHub Desktop.
Install MongoDB PHP Driver on OSX

Install PECL

Thanks to Jason McCreary
https://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/

Install MongoDB Drive

$ sudo pecl install mongodb
NB: Take a note the path, for me :/usr/local/Cellar/php71/7.1.13_24/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so

Setup php.ini

Thanks to Budi Irawan
http://budiirawan.com/install-php-intl-extension-os-x/

  1. Check php.ini location
    $ php --ini
  2. Add the following line at the bottom of php.ini
    extension=/usr/local/Cellar/php71/7.1.13_24/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment