Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I installed mongodb (mongodb-osx-x86_64-2.4.3) and was then trying to add the extension libraries for php.

Following the manual install instructions at http://php.net/manual/en/mongo.installation.php, I updated the extension library to /usr/lib/php/extensions/no-debug-non-zts-20090626/

Everything seemed to work fine, because when I ran php -i | grep extension_dir, it showed the right directory.

But Mongo still wasn't turning up in my phpinfo file.

So, I checked the ini file at /private/etc/php.ini.default and made sure extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626/" was there, which it was.

Then I tried manually adding extension=mongo.so and mongo_extension = "/usr/lib/php/extensions/no-debug-non-zts-20090626/mongo.so. Still no mongo db in the phpinfo file. (I restarted Apache after each edit and then reloaded the phpinfo file.)

The phpinfo file showed that the default locations were in Applications > MAMP > bin > php > php5.3.6

So I tried copying the mongo.so file to Applications > MAMP > bin > php > php5.3.6 > lib > php > extensions > no-debug-non-zts-20090626 and modified the php.ini in Applications > MAMP > bin > php > php5.3.6 > conf/php.ini, first by adding extension=mongo.so and then mongo_extension = "/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/mongo.so"

One of those last edits (either to private/etc/php.ini.default or to Applications > MAMP > bin > php > php5.3.6 > conf/php.ini), crashed MySQL -- when I start MAMP now, Apache starts but MySQL doesn't and I get an error when I try to load any files on my localhost.

I tried reverting everything back and also tried downloading a fresh php.ini file from here: http://svn.php.net/repository/php/php-src/branches/PHP_5_3/php.ini-development

But MySQL still won't start. I'm on Mac OS 10.7.3.

And ideas/advice on what to try next?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.