How to set MongoDB driver on XAMPP

5.4k Views Asked by At

I try to set MongoDB on XAMPP, but don't work :(

I use

Windows 10,

XAMPP v3.2.1

PHP 5.6.8

Which driver I need to download? Thanks to all!! :)

XAMPP INFO: http://oi62.tinypic.com/294qk4k.jpg

2

There are 2 best solutions below

12
On

Check this link to setup MongoDB in xampp.

Configure MongoDB with PHP on windows for XAMPP in 5 simple steps

Also after setting up ,cross check your PHP configuration for following:

Removing the ; from the beginning of

;extension=php_mongo-1.3.1-5.4-vc9.dll 

in your php.ini to enable MongoDB.

Also set extension_dir as absolute path in php.ini

extension_dir = "d:\php-5.4.32\ext"

comment the php_curl.dll module in php.ini

;extension=php_curl.dll
0
On

I am not sure, if you still need another answer but I guess, I had a similar problem.

I've downloaded the right php_mongodb.dll for my configuration (xampp with PHP 5.6.24, MSVC11, x86 and thread safety enabled) and tried to set up the configuration many times without any changes.

So, I've tried a new php version (xampp with PHP 7.0.18, MSVC14, x86 and thread safety enabled) and I've got all what I've wanted in 5 mins.