zeus
zeus

Reputation: 254

The MongoDB PECL extension has not been installed or enabled php7.0 codeigniter cimongo library ubuntu16.04

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

Answers (2)

MudithaE
MudithaE

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

Related Questions