开发者

Can't enable php modules in MAMP

It may sound stupid, but I can't add extensions to my php.ini

let me explain.

on a script, I do a phpinfo(), it tells me my php.ini is at "/Library/Application Support/appsolute/MAMP PRO/conf/php.ini"

I open the file, check the extension dir, put my new extension there (mongo) make it executable.

I add "extension=mongo.so" after all other extension declarations, reboot the server ... and the extension doesn't load ... And nothing in the error log. (apache and php)

after many retries and even a complete reboot, it's still the same.

I tried to disable every extension that is loaded with it. and it's the same, all these extensions remain loaded.

开发者_如何学运维Is there another place where it loads extensions ?

I use php 5.2.11 on Snow Leopard 10.6.4


in the main window of MAMP click File -> Edit Template and chose the php.ini you want to edit and add the mongodb extension there ..

save and restart MAMP and it should be loaded.

more info: http://www.davidgolding.net/mongodb/installing-mongodb-on-mamp-1-9-5.html


SOLUTION: restart your machine not just web server.

the same thing happened to me on mamp, and i restarted the machine, not just the web server and it loads. but you may run into client issue with php command in such case do this:

this is the solution for osx:

brew install php56-mongo

if it errors out then read the package name and re-run such as - example:

example: brew install php5789-mongo

source: http://php.net/manual/en/mongo.installation.php#mongo.installation.osx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜