Thursday, March 10, 2022

[FIXED] Configuring mongodb on MAMP

Issue

So I've tried almost all the tutorials I've found here and on other sources but the problem is always the same. The extension is not installed when I call the phpinfo method. I've added the file mongo.so to the extensions folder and I've called it on the php.ini as extension=mongo.so.

I'm using MAMP 2.2 on Mavericks and the php version is 5.5.3.

Appreciate any kind of help.


Solution

The output of phpinfo() will tell you which php.ini file (if any) is in use. You have to modify that php.ini file and add extension=mongo.so and then restart your webserver.

One thing you need to keep in mind when you are installing the MongoDB driver for MAMP is the pecl command you are using is actually the MAMP command, not some alternative PHP install you may have on your system.

To do this, locate the PHP binary distributed with MAMP, and the use the full path to the pecl command of the MAMP installation.



Answered By - bjori

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.