skip to Main Content

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: extmongodb (The specified module could not be found), extphp_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

Answers


  1. 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

    Login or Signup to reply.
  2. I’ve tried build from ApacheLounge It is packed with mongodb DLL and many others (Redis, etc.) Seems like it works OK.

    Login or Signup to reply.
  3. 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()
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search