PHP Startup Unable to load dynamic library php_mongo.dll

If you are still having problems after doing the above, do try older version drivers instead.

That is what worked for me on for my XAMPP/ PHP 5.5 on windows 8.

Older drivers can be found here: https://s3.amazonaws.com/drivers.mongodb.org/php/index.html

New drivers can be found here: http://pecl.php.net/package/mongo/1.5.5/windows

You may also want to visit : https://serverfault.com/questions/563867/mongodb-unable-to-load-driver-on-php


For anyone googling this in 2017, the PECL Package has been updated and is now found at http://pecl.php.net/package/mongodb/1.2.9/windows

and use:

extension=php_mongodb.dll 

instead of:

extension=php_mongo.dll

Copy C:\xampp\php\libsasl.dll to C:\xampp\apache\bin\, restart Apache and enjoy.


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!

Tags:

Php

Dll

Mongodb