I'm trying to get Laravel MongoDB working in my local machine (Windows 10 home, x64) by following this tutorial
- I have installed XAMPP 7.3.11 on
D:\xampp
succesfully and tested that the server can be reached (enterlocalhost:80
on browser) I proceeded on extracting
php_mongodb.dll
I got from pecl(mongodb 1.6.0 for Windows, 7.3 Non Thread Safe, x64 ) onD:\xampp\php\ext
and add the lineextension=php_mongodb.dll
on the fileD:\xampp\php\php.ini
After selecting 'the command-line PHP you want to use' to
D:\xampp\php\php.exe
, the setup then gave the following output:The PHP exe file you specified did not run correctly: D:\xampp\php\php.exe
The php.ini used by your command-line PHP is: D:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
Program Output: PHP Warning: PHP Startup: Unable to load dynamic library 'php_mongodb.dll' (tried: D:\xampp\php\ext\php_mongodb.dll (The specified module could not be found.), D:\xampp\php\ext\php_php_mongodb.dll.dll (The specified module could not be found.)) in Unknown on line 0
Commenting out the line extension=php_mongodb.dll
will execute D:\xampp\php\php.exe
without any warning. But I would need php to be aware of php_mongodb.dll
during composer installation, right?
So how to resolve this problem? The file definitely exists in the folder, and the required modification on php.ini
has been provided.
I have already looked around and some people mentioning the path in extension_dir
must be written in full path. But I have already checked that the line on my php.ini
is extension_dir="D:\xampp\php\ext"