1
votes

I am trying to enable the php_ldap extension on Windows Server 2012 R2 (64 bits).

My environment is Apache 2.4 + PHP 7 (this version)

I've removed the ; from ;extension=php_ldap.dll in php.ini. However I got this error in error.log:

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

I am using the Dependency Walker to get some extra information about "dependencies" of php_ldap.php:

  • API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
  • API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
  • API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
  • API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
  • EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
  • SETTINGSYNCPOLICY.DLL

I've installed different version of VC Redistributable (2005,2008,2010,2012,2015) and it was useless

Is it possible use the php_ldap on Windows Server 2012?

1
What does your extension_dir directive look like in your php.ini file?ChadSikorra
extension_dir = "E:\php7\ext" and the php_ldap.dll is therecelsowm
Maybe it needs a trailing slash? Have you tried making it: extension_dir = "E:\php7\ext\"ChadSikorra
@ChadSikorra trailing slash is not required. It seems that error "module not found" appears even if the module is found but some dependencies aren't (unfortunately it does not mention which dependency is missing)Pavel Cernik

1 Answers

0
votes

I've found the solution, copy those DLLs:

  • LIBSASL.DLL
  • php7ts.dll
  • IESHIMS.DLL

to:

  • System32
  • SysWOW64
  • php7
  • Apache24/bin