Make sure you download the correct .DLL for your PHP installation. Good chance you’re running apache x86, so download an x86 php_mongo.dll
. Also if you’re running PHP as an Apache module, make sure you pick the thread safe (ts)
one and also pick this type of dll
that matches the PHP version you’re running.
The versions must match or else you will get a php startup error. Find these Mongo DLLs here.
I did this then I got an error libsasl.dll
not found. I simply copied the libsasl.dll
found in my PHP installation directory to the Apache
installation directory (where httpd.exe
is found). Then I restarted my Apache and it worked!