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.
My Answer:
Unfortunately, it seems that the MongoDB dll file version 1.9.0 that you have is not compatible with PHP 8. You will need to wait for an updated version of the MongoDB dll file that is specifically compatible with PHP 8.
In the meantime, you can try using a different database driver that is compatible with PHP 8, such as the MongoDB PHP Library (https://docs.mongodb.com/drivers/php/). This library provides a more flexible and up-to-date way to interact with MongoDB in PHP applications.
Alternatively, you can also consider using a different version of PHP that is compatible with the MongoDB dll file version 1.9.0, such as PHP 7.4, until a compatible version for PHP 8 is released.
Rate this post
4 of 5 based on 3315 votesComments