我正在尝试使用php和mongo的CIMongo库来使用php和mongo,但我遇到了错误: MongoDB PECL扩展没有安装或启用,但我正确地安装了一切- pecl install mongodb apt-get install php-mongodb
将非常感谢您的任何帮助
发布于 2017-05-23 18:21:12
对于那些在谷歌搜索“MongoDB PECL扩展尚未安装或启用”后来到这里的windows用户。(可能是其他操作系统用户也有相同的问题,也可以从这里获取一些线索):
以前的codeigniter版本使用php_mongo.dll (mongo pecl),您可以从here下载
下面是早期版本检查Mongo扩展是否存在的方法。
if(!class_exists('Mongo'))
{
$this->_show_error('The MongoDB PECL extension has not been installed or enabled', 500);
}但是更新的codeigniter版本寻找php_mongodb.dll (mongodb pecl),它可以从here下载
下面是较新的版本如何检查Mongo扩展的存在。
if (!class_exists('MongoDB\Driver\Manager')) {
show_error("The MongoDB PECL extension has not been installed or enabled", 500);
}发布于 2016-09-30 14:22:54
我也得到了这个错误..我用的是Bellow sollution,这对我很有效。
https://stackoverflow.com/questions/38411116
复制相似问题