尽管有 mongodb php 的驱动程序,但 rockmongo 无法工作
rockmongo not working despite having mongodb driver for php
我已经在 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"))
返回错误
sudo pecl 搜索 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
怎么办?
Rockmongo 似乎不兼容 PHP 7 和新的 mongodb
驱动程序,但您可以按照说明 from here 使其工作。
我已经在 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"))
返回错误
sudo pecl 搜索 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
怎么办?
Rockmongo 似乎不兼容 PHP 7 和新的 mongodb
驱动程序,但您可以按照说明 from here 使其工作。