Fatal error: Class 'MongoDB\Driver\Manager' not found

There is some confusion between the Mongo extension and the MongoDB extension which are not the same. Because of your version number, I guess you are using the old Mongo extension that is deprecated.

Make sure that you install the new MongoDB extension and you should be fine. Don't forget to remove the old extension=mongo.so from your php.ini since this could cause problems.


For me, I forgot to add extension=mongodb.so to the php.ini for FPM (FastCGI Process Manager). On Ubuntu 16.04 this was at:

/etc/php/7.0/fpm/php.ini

For what it's worth I'm using nginx.

Tags:

Php

Mongodb