-1

I am upgrading my Ubuntu server and installing latest version of PHP i.e PHP 7.0.18, MongoDB 3.2.14, CodeIgniter v 2.2. Now when I am trying to connect with Mongo through CodeIgniter I am getting error as:

The MongoDB PECL extension has not been installed or enabled.

Kindly help. Kindly note my MongoDB and app are in two different instances. From app instance through CLI I can access the MongoDB but through CodeIgniter I am not able to.

Actually I am not able to update the lib file which I am using as per the updated versions.

Thanks.

Michael
  • 41,989
  • 11
  • 82
  • 128

1 Answers1

0

Go to php.ini and search for the extension and pass the proper extension path like:

extension="/usr/lib/php/extensions/no-debug-non-zts-20100525/mongo.so"

uncomment it by removing the ; from the starting and restart the apache and try again.

Mayank Pandeyz
  • 25,704
  • 4
  • 40
  • 59