In order to start running MongoDB with PHP, there is a need to install MongoDB PECL Module.
Ensure that you have your MongoDB setup and installed correctly. If not, proceed to MongoDB Installation on OS X to start installing first.
- Download the MongoDB driver for OS X from the github.
- Unzip and Extract the mongo.so to:
- Open your php.ini file and add the following:
- Search for Extensions (Dynamic Extensions) and add to the list:
- Restart MAMP
- Check phpinfo()
where DATESTAMP could be 20090626 etc.
sudo vi /Applications/MAMP/conf/php5.3/php.ini