Sunday, September 14, 2014

Installing PHP Mongo Driver on MAMP

To install latest Mongo driver on MAMP

1 - install autoconf using homebrew or Mac Ports
brew install autoconf
2 - Download php 5.4.10 source from php.net.
3 - rename uncompressed php source folder from php-5.4.10 to php and paste it in this folder
/Applications/MAMP/bin/php/php5.4.10/include/
4- using the terminal open php folder and run ./configure
cd /Applications/MAMP/bin/php/php5.4.10/include/php/ && ./configure
5 - Add MAMP bin to your ~/.bash_profile
echo "export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH" >> ~/.bash_profile source ~/.bash_profile
6 - install latest mongo
pecl install mongo
7- restart MAMP server :).
8- Enable the extension Edit /Applications/MAMP/bin/php/php5.4.10/conf/php.ini Add the following line after the section named "; Extensions":
extension=mongo.so

No comments:

Post a Comment