问题描述
我已经下载,编译并安装了适用于php&的最新mongo驱动程序.它被放置在:
I have downloaded, compiled and installed the latest mongo driver for php & it's been placed at:
/opt/local/lib/php/extensions/no-debug-non-zts-20090626/mongo.so
如何将其添加到MAMP php.ini文件?我看过只是尝试添加"extension = mongo.so",但这不起作用.我还尝试将mongo.so文件放在目录中:
How would I go about adding this to the MAMP php.ini file? I have looked at just trying to add the "extention=mongo.so" however this does not work. I also tried to place the mongo.so file inside the dir:
/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-xxx/
并将正确的代码行添加到php.ini ...
And added the correct line of code to php.ini...
我必须告诉它扩展名所在的目录吗?
Would I have to tell it the directory the extension is in?
推荐答案
要在MAMP上安装最新的Mongo驱动程序
To install latest Mongo driver on MAMP
1-使用自制软件或Mac端口安装 autoconf
1 - install autoconf using homebrew or Mac Ports
2-从 php.net .
3-将未压缩的php源文件夹从 php-5.4.10 重命名为 php 并将其粘贴到该文件夹中
3 - rename uncompressed php source folder from php-5.4.10 to php and paste it in this folder
4-使用终端打开php文件夹并运行./configure
4- using the terminal open php folder and run ./configure
5-将MAMP箱添加到您的〜/.bash_profile
5 - Add MAMP bin to your ~/.bash_profile
6-安装最新的mongo
6 - install latest mongo
7-重新启动MAMP服务器:).
7- restart MAMP server :).
8-启用扩展Edit/Applications/MAMP/bin/php/php5.4.10/conf/php.ini在名为; Extensions"的部分之后添加以下行:
8- Enable the extension Edit /Applications/MAMP/bin/php/php5.4.10/conf/php.ini Add the following line after the section named "; Extensions":
这篇关于在MAMP上安装Mongo驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!