Monday, December 05, 2011

Unable to load dynamic library php_ldap.dll

[Solved] PHP Startup: Unable to load dynamic library c:/wamp/bin/php/php5.3.8/ext/php_ldap.dll. The specific module could not be found.

If you are using WAMP server and trying to do LDAP authentication with PHP you will probably get into this issue. Do the simplest and obvious first to check (correct) php.ini (as it is shown in phpinfo output) and extension_dir path in php.ini. If nothing works and you still see this error while starting/restarting wamp server copy libsasl.dll (located inside php folder) to system32 folder. Now restart the wamp server and this error should go away.

How to enable LDAP support for PHP on WAMP.
If you are starting fresh, download and install WAMP server (http://www.wampserver.com/en/) and install it. There is hardly anything that you can do during installation. Once the installation is done, click on wamp service->php->php extensions->ldap. Now restart the WAMP services (wamp service->Restart All Services) and you might get "PHP Startup: Unable to load dynamic library php_ldap.dll" dialog OR look into Apache error log (wamp server->Apache->Apache error log) for this error. Simply copy libsasl.dll into system32 folder. Now restar wamp server and php_ldap should be loaded correctly without any error.

Keywords: Configuring LDAP Windows WAMP Server

6 comments:

Anonymous said...

thanks.... This wa a real time saver

Anonymous said...

thank you.. it really works!

Anonymous said...

Thanks

Yesenia Fuentes Venezuela said...

thank you.. it really works!

Paynalton said...

Thanks for this!!!

Unknown said...

thank you..!!!