Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MongoDB PECL扩展尚未安装或启用php7.0 codeigniter cimongo库ubuntu16.04_Php_Mongodb_Codeigniter - Fatal编程技术网

MongoDB PECL扩展尚未安装或启用php7.0 codeigniter cimongo库ubuntu16.04

MongoDB PECL扩展尚未安装或启用php7.0 codeigniter cimongo库ubuntu16.04,php,mongodb,codeigniter,Php,Mongodb,Codeigniter,我正在尝试使用CIMongo库来让codeigniter使用php和mongo 但我犯了一个错误:MongoDB PECL扩展尚未安装或启用 但是我安装的都是正确的 -pecl安装mongodb apt-get-install-php-mongodb 如果有任何帮助,我将不胜感激 提前谢谢我也收到了这个错误。。 我使用贝娄溶液,这对我很有效 适用于在谷歌搜索“MongoDB PECL扩展尚未安装或启用”后出现在此处的windows用户。(可能其他操作系统用户也有同样的问题,也可以从这里获得一些线

我正在尝试使用CIMongo库来让codeigniter使用php和mongo 但我犯了一个错误:MongoDB PECL扩展尚未安装或启用 但是我安装的都是正确的 -pecl安装mongodb apt-get-install-php-mongodb

如果有任何帮助,我将不胜感激
提前谢谢

我也收到了这个错误。。 我使用贝娄溶液,这对我很有效


适用于在谷歌搜索“MongoDB PECL扩展尚未安装或启用”后出现在此处的windows用户。(可能其他操作系统用户也有同样的问题,也可以从这里获得一些线索):

首先感谢他的回答

以前的codeigniter版本使用了php_mongo.dll(),您可以从

下面是早期版本如何检查Mongo扩展的存在

if(!class_exists('Mongo'))
{
    $this->_show_error('The MongoDB PECL extension has not been installed or enabled', 500);
}
if (!class_exists('MongoDB\Driver\Manager')) {
   show_error("The MongoDB PECL extension has not been installed or enabled", 500);
}
但较新的codeigniter版本寻找php_mongodb.dll(),您可以从

下面是新版本如何检查Mongo扩展的存在

if(!class_exists('Mongo'))
{
    $this->_show_error('The MongoDB PECL extension has not been installed or enabled', 500);
}
if (!class_exists('MongoDB\Driver\Manager')) {
   show_error("The MongoDB PECL extension has not been installed or enabled", 500);
}

此答案仅适用于Windows用户。我想要一些帮助,我现在面临着同样的PECL错误,我使用Debian与NGiNX,PHP7和CI 3.XI不知道为什么我得到这个错误,但在我删除和再生由<代码>作曲家。