Reputation: 254
I am trying to use CIMongo Library for codeigniter to use php and mongo But I am getting err:The MongoDB PECL extension has not been installed or enabled But I installed everything correctly - pecl install mongodb apt-get install php-mongodb
Will be greatful for any help Thanks in advance
Upvotes: 2
Views: 8862
Reputation: 617
For the windows users who end up here after googling "The MongoDB PECL extension has not been installed or enabled". (May be other OS users having the same issue also can grab some clues from here):
First of all thanks simon for his answer here
Previous codeigniter versions used the php_mongo.dll (mongo pecl) which you can download from here
Below is how earlier versions check for the existence of the Mongo extension.
if(!class_exists('Mongo'))
{
$this->_show_error('The MongoDB PECL extension has not been installed or enabled', 500);
}
But newer codeigniter version looks for php_mongodb.dll (mongodb pecl) which is you can download from here
Below is how newer versions check for the existence of the Mongo extension.
if (!class_exists('MongoDB\Driver\Manager')) {
show_error("The MongoDB PECL extension has not been installed or enabled", 500);
}
Upvotes: 1
Reputation: 1
i had also got this error.. I use Bellow sollution, that works for me.
Upvotes: 0