My PHP version is 8.2.4
My Laravel version is 10.10
i am using xampp.
the issue is because of the php extention 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 coping mongodb.dll file but still its not working
2
Answers
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:xamppphpext
After that add extension=php_mongodb.dll in php.ini file.
Finally, restart the xampp apache the extension will be installed.
Thank you
A "class not found" message is not an issue of php, instead of missing mongodb library which you can install with composer: https://github.com/mongodb/laravel-mongodb.
Then if you have other issues caused by missing driver you will see a different error.