MongoDB with MAMP on OS X
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()
/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-DATESTAMP
where DATESTAMP could be 20090626 etc.
sudo vi /Applications/MAMP/conf/php5.3/php.ini
extension=mongo.so

Reference:
http://mattgeri.com/blog/how-to-install-the-mongodb-pecl-extension-on-mamp/
http://en.saturngod.net/blogpost/mongo-db-with-mac
http://jermainemaree.com/blog/install-mongo-php-driver-in-mamp