Reputation: 739
I'm trying to install the php mongo extension in MAMP but it doesn't work.
Here is what I did:
sudo pecl install mongo
And find the extension folder with:
php -i | grep extension_dir
extension_dir => /usr/lib/php/extensions/no-debug-non-zts-20100525 => /usr/lib/php/extensions/no-debug-non-zts-20100525
And copy the mongo.so file in MAMP:
sudo cp /usr/lib/php/extensions/no-debug-non-zts-20100525/mongo.so /Applications/MAMP/bin/php/php5.5.10/lib/php/extensions/
To finish, I added extension=mongo.so in:
/Applications/MAMP/bin/php/php5.5.10/conf/php.ini
But even after a MAMP restart, the mongo extension is not loaded in phpinfo().
I also tried to compile the extension with sources but same problem.
Thank you
Upvotes: 0
Views: 813
Reputation: 416
I had a similar problem with MAMP for php 5.5.10 - turns out MAMP has the php.ini files in two different places - /Applications/MAMP/conf/php.5.5.10 and /Applications/MAMP/bin/php/php5.5.10/conf! It uses the latter, but I was editing the former. Hope this is helpful to someone else!
Upvotes: 0
Reputation: 739
I changed the PHP version to 5.4.4 and the extension is now well loaded.
Upvotes: 1