1

I'm using Laravel 5.4 with Valet. I've installed PHP 7.1 and MongoDB drivers for PHP. I've followed every instruction to setup my Laravel project with MongoDB but when I try to communicate with my DB I get this error:

FatalThrowableError in Client.php line 81: Class 'MongoDB\Driver\Manager' not found

I checked my extensions in my PHP.ini and it's all there. Everything is fine but my project won't work.

Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
McMazalf
  • 59
  • 1
  • 9

1 Answers1

0

Looks to me like you need to run composer install to get your libraries installed (https://getcomposer.org/). If it fails after that, you may need the pecl mongodb library (at https://pecl.php.net/package/mongodb).

Run a php -m to ensure that your mongo library is installed also. Just because it's in your php.ini does not mean it's shared libraries or other files are available.

Xedecimal
  • 3,153
  • 1
  • 19
  • 22