php 7.4 mongodb dll file(1.9.0) not compatible with php 8 on windows 10 system

3.9k Views Asked by At

As you know PHP 8 is released I am excited and want to try it out. But I have a requirement for MongoDB, I tried adding MongoDB dll file of 7.4 to php8, it’s giving the error like.


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

I have added in my php.ini

extension=mongodb

The dll file version is 1.9.0(it is mentioned that it is compatible with php8) but it’s for PHP 7.4, I’m not able to find the dll file for the php8 version specifically can anyone help me here.

3

There are 3 best solutions below

0
On BEST ANSWER

Give it a few days, extensions need to catch up. Right now there are no php8 PECL out there. You can also check out this page here

0
On

I've tried build from ApacheLounge It is packed with mongodb DLL and many others (Redis, etc.) Seems like it works OK.

0
On

On windows you can do the following steps to enable mongodb extension:

  1. Download the dll file for php 8.0 from PECL accordingly.
  1. Extract the zip file and copy php_mongodb.dll file to php/ext folder
  2. Add extension=php_mongodb.dll in you php.ini file
  3. Restart the apache server and check mongodb segment in your phpinfo()