在MAMP上安装Mongo驱动程序 [英] Installing Mongo Driver on MAMP

查看:82
本文介绍了在MAMP上安装Mongo驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载,编译并安装了适用于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

简单安装autoconf

brew install autoconf

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

/Applications/MAMP/bin/php/php5.4.10/include/

/Applications/MAMP/bin/php/php5.4.10/include/

4-使用终端打开php文件夹并运行./configure

4- using the terminal open php folder and run ./configure

cd/Applications/MAMP/bin/php/php5.4.10/include/php/&& ./configure

5-将MAMP箱添加到您的〜/.bash_profile

5 - Add MAMP bin to your ~/.bash_profile

echo"export PATH =/Applications/MAMP/bin/php/php5.4.10/bin:$ PATH" >>〜/.bash_profile 来源〜/.bash_profile

echo "export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH" >> ~/.bash_profile source ~/.bash_profile

6-安装最新的mongo

6 - install latest mongo

pecl安装mongo

pecl install 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":

extension = mongo.so

extension=mongo.so

这篇关于在MAMP上安装Mongo驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆