Class "MongoDB\Driver\Manager" not found

sahim
Sahim Sakir
Published on Jan, 09 2024 1 min read 0 comments
image

Question:
My PHP version is 8.2.4 My Laravel version is 10.10 I am using xampp. the issue is because of the PHP extension of Mongodb in my xampp. I can not be able to have any extensions for MongoDB. can anyone help me to solve this issue?

I have tried copying mongodb.dll file but still it's not working.

Answer:
This Issue is solved,

The solution is to get the particular version of MongoDB dll file from Github Releases and then copy the dll file to the desired location of xampp's ext folder.

Example:

My PHP Version is 8.2.4, so I need to download the MongoDB dll file which will support PHP 8.2.4 version which is {php_mongodb-1.15.0-8.2-ts-x64.zip} (extension_name-extension_version-php_version-windows_bit)

After downloading, extract the zip file anywhere on the pc.

Then copy the php_mongodb.dll and php_mongodb.pdb file to the xampp ext folder for me it is C:\xampp\php\ext

After that add extension=php_mongodb.dll in php.ini file.

Finally, restart the xampp apache the extension will be installed.

Thank you

0 Comments