Ubuntu安装php--mongo扩展

Linux上安装 MongoDB PHP扩展

1.  $ sudo pecl install mongo
1)在出现的对话框中输入“no”
build with Cyrus SASL (MongoDB Enterprise Authentication) support? [no]  

2)install ok: channel://pecl.php.net/mongo-1.6.12

configuration option "php_ini" is not set to php.ini location

You should add "extension=mongo.so" to php.ini


2. 配置
locate php.ini

/usr/share/php5/php.ini-development

/usr/share/php5/php.ini-production

/usr/share/php5/php.ini-production.cli

在php.ini-development中添加  "extension=mongo.so"
安装php--mongo扩展成功 

你可能感兴趣的:(Ubuntu安装php--mongo扩展)