After adding the php_mongodb.dll to php.ini and to the php/ext I'm getting an error 'module not found'

40 Views Asked by At

Here's the error

PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mongodb.dll' (tried: C:\xampp\php\ext\php_mongodb.dll (The specified module could not be found), C:\xampp\php\ext\php_php_mongodb.dll.dll (The specified module could not be found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'php_mongodb.dll' (tried: C:\xampp\php\ext\php_mongodb.dll (The specified module could not be found), C:\xampp\php\ext\php_php_mongodb.dll.dll (The specified module could not be found)) in Unknown on line 0
Cannot use mongodb/mongodb's latest version 1.17.0 as it requires ext-mongodb ^1.17.0 which is missing from your platform.

In PackageDiscoveryTrait.php line 318:

  Package mongodb/mongodb has requirements incompatible with your PHP version, PHP extensions and Composer vers  
  ion:
    - mongodb/mongodb 1.17.0 requires ext-mongodb ^1.17.0 but it is not present.

I tried downloading mongodb-1.17.0.tgz but it seems no version below 1.13.0 has a dll? Is there a newer way to install mongodb drivers for PHP?

2

There are 2 best solutions below

0
Matt On

I assume your config has a line like:

extension=php_mongodb.dll

instead, use:

extension=mongodb

(and make sure your dll file exists at C:\xampp\php\ext\php_mongodb.dll)

0
Amit Sharma On

Download Thread safe version

link => https://pecl.php.net/package/mongodb/1.13.0/windows

check your php version