Enabling PHP MongoDB Support for macOS
The Tutorial Simply shows you Step-by-Step How to Install the PHP 5 MongoDB Database Extension by PECL on Mac 10.9 Mavericks OS X.
MongoDB (from “humongous”) is an Open-Source Document Database written in C++, and the leading NoSQL database.
PECL is short for “PHP Extension Community Library“. PECL Extensions are also distributed as packages and can be installed using the PEAR installer with the PECL command.

-
Open Terminal Window
(Press “Enter” to Execute Commands) -
Installing Required autoconf Package by MacPorts
sudo su
If Got “User is Not in Sudoers file” then see: How to Enable sudo
port install autoconf
How to Install MacPorts on Mac 10.9 Mavericks
-
How to Install/Enable Pear/Pecl Command on Mac OS X
-
Installing PHP 5 MongoDB Extension
pecl install mongo
-
Enabling PHP 5 MongoDB Extension
nano /[path/2]/php.ini
On the Extensions Section Add:
extension=mongo.so
Ctrl+x to Save & Exit!
-
Restart Apache to Load the PHP MongoDB Support.
Tags: Guide, How-to, Install, install pear mac os x, install pecl mac os x, mac mavericks 10.9, MongoDB, Pear, pear mac os x, Pecl, pecl mac os x, pecl module mac os x, php mongodb, php pecl module, Tutorial