Install MongoDB for PHP5.4 on MAMP

1. Download mongo.so from https://github.com/stennie/mongo-php-driver/downloads

2. Copy mongo.so to MAMP PHP folder.

For example, mine is at
/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/
Remember to select the correct PHP version. You can check your PHP version from your MAMP start page, e.g http://localhost/MAMP/phpinfo.php


3. Enable the extension in PHP Configuration file (php.ini). You can find the path to the file from the PHPInfo (see above example).

To enable, add the following line in the "Dynamic Extension" section.
extension=mongo.so

4. Restart your MAMP. You should see "mongo" section in PHPinfo.




Comments

Popular posts from this blog

[Azure Websites PHP] Cross Domain request results in blank response page after Preflight HTTP OPTIONS

[Magento] Create Contact Form with Dynamic Recipient