4

I've looked at many of the previous questions, but I'm still unable to get this issue fixed. I've installed PHP Version 5.4.9 and Apache 2.4.12 in windows - 64Bit. When I start the service I get the following error :

PHP Warning:  PHP Startup: Unable to load dynamic library 'D:\app\php\ext\php_ldap.dll' - The specified module could not be found in Unknown on line 0.

The path where PHP is : D:\app\php

My extension path in php.ini is : extension_dir = D:\app\php\ext

Path where libeay32.dll and ssleay32.dll is : D:\app\php

I referred to the Questions posted in the link below :

Link 1

Link 2

Link 3

yet nothing seems to work. Appreciate any help.

Community
  • 1
  • 1
SR1092
  • 555
  • 1
  • 7
  • 31
  • I did a quick search with these keywords: `php could not be found in Unknown` and found this [SO question](http://stackoverflow.com/questions/24984913/unable-to-load-dynamic-library-c-wamp-bin-php-php5-5-12-ext-php-intl-dll), please check if one of the answers solves your problem. – Alex Shesterov Apr 11 '16 at 12:14
  • @AlexShesterov Thanks for the quick response. The dll file the question is for is `php_intl.dll` but I am specifically looking for `php_ldap.dll`. Everything else is working except this. – SR1092 Apr 11 '16 at 12:17

5 Answers5

3

after enabling extension =php_ldap.dll in php.ini

you must add following dll to system32 in windows

copy libsasl.dll into system32 folder

steps: php.ini enable ;extension =php_ldap.dll --> extension =php_ldap.dll

copy libsasl.dll from php folder and paste it in system32

windows-->system32--> paste libsasl.dll

Incase it does not work and also add libeay32.dll and ssleay32.dll.

JSON C11
  • 11,272
  • 7
  • 78
  • 65
pdk
  • 31
  • 6
1

Try copying libeay32.dll,ssleay32.dll and libeay32.dll in sysWow64 and Restart the machine. It should work.

ST1602
  • 81
  • 8
0

with Win10, Apache 2.4.41x64 and php 7.3.8x64 the following worked for me: overwrite these dlls in Apache/bin folder with the files from php folder

  • libssl-1_1-x64.dll
  • libcrypto-1_1-x64.dll

also added libsasl.dll
Do not need to change any system folder content.
Of course the the right php.ini settings are crucial (enable extension, set extension path).
Then restart Apache.

Guest
  • 1
0

For Windows 10 copy a file from 'xampp\php\libsasl.dll' and paste it into 'xampp\apache\bin' After this restart Apache server once.

zakmail007
  • 165
  • 1
  • 1
  • 4
0

I just came across this article because I had the same issue on Windows. PHP told me that "The specified module could not be found". I didn't want to put files into the system folders so I added the php directory to the windows path environment variable. In my opinion this is less 'invasive' and it's the recommended way according to https://www.php.net/manual/en/ldap.installation.php

This worked for me. Cheers.