Setting Up MongoDB with PHP and MAMP

If you haven’t already installed mongodb in your system:

Then, to install latest Mongodb driver using PECL:

  • Install autoconf using homebrew or Mac Ports:

  •   Download latest stable PHP  source from
  •  Create  phpx.x.x/include/ (example: php5.5.10)  folder in

  • Rename uncompressed php source folder from php-x.x.x to php and paste it in this folder

  •   Using the terminal open php folder and run ./configur


  • Add MAMP bin to your ~/.bash_profile

  •  Install latest mongo

  • Edit php.ini

  •   Restart MAMP server  :)