我在ubuntu 16.04中安装了php7.0 我安装了驱动程序,如http://php.net/manual/en/mongodb.installation.manual.php
所示$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver
$ git submodule sync && git submodule update --init
$ phpize
$ ./configure
$ make all -j 5
$ sudo make install
当我尝试从浏览器打开rockmongo时,显示
To make things right, you must
install php_mongo module. Here for installation documents on PHP.net.
同样在rockmongo的index.php中,我放了die
并发现了
这条线
if (!class_exists("Mongo") && !class_exists("MongoClient"))
返回false
sudo pecl search mongo 返回
Retrieving data...0%
.Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo 1.6.14 (stable) MongoDB database driver
mongodb 1.1.7 (stable) MongoDB driver for PHP
我还包括了php.ini
的扩展名也做了
sudo service apache2 restart
我跑了sudo pecl install mongodb
给出了这个结果
Build process completed successfully
Installing '/usr/lib/php/20151012/mongodb.so'
install ok: channel://pecl.php.net/mongodb-1.1.7
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongodb.so" to php.ini
怎么办?