简体   繁体   English

我如何摆脱ldap_connect()错误

[英]how do I get rid of the ldap_connect() error

  • Windows Server 2016 64 bit (Fully Updated) Windows Server 2016 64位(完全更新)
  • WAMP/3.0.6 (Win32) WAMP / 3.0.6(Win32)
  • Apache/2.4.9 (Win32) Apache / 2.4.9(Win32)

  • PHP/7.2.6 (Win32) PHP / 7.2.6(Win32)

Error 1 : Fatal error: Uncaught Error: Call to undefined function ldap_connect() 错误1:致命错误:未捕获的错误:调用未定义的函数ldap_connect()

I've been sitting with this error now for a while and I don't seem to get it sorted. 我已经坐了一段时间了,但似乎没有得到解决。 Nothing I do seems to have any impact on this error. 我似乎对这个错误没有任何影响。 I also can't seem to find any source of these DLL files. 我似乎也找不到这些DLL文件的任何源。 My guess is that the DLL fails to load , because it's somehow not compatible with 7.2.6 我的猜测是DLL无法加载,因为它与7.2.6不兼容

What I have tried : 我尝试过的

0.) Enabled extension in php.ini using the correct php.ini file 0.)使用正确的php.ini文件在php.ini中启用扩展名

1.) Copied libeay32.dll,ssleay32.dll,php_ldap.dll,libsasl.dll into C:\\Windows\\system , \\apache2.4.9\\bin 1.)复制libeay32.dll,ssleay32.dll,php_ldap.dll,libsasl.dllC:\\ Windows \\ system\\ apache2.4.9 \\ bin

Everything else works fine. 其他一切正常。 I can run phpinfo() and I have a few other sites on there that open up fine. 我可以运行phpinfo(),在那里还有其他一些站点可以正常运行。 My error log file is as follows : 我的错误日志文件如下:

[16-Jun-2018 20:17:30 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_curl.dll' (tried: d:/wamp/bin/php/php7.2.6/ext/php_curl.dll (The specified module could not be found.), d:/wamp/bin/php/php7.2.6/ext/php_php_curl.dll.dll (The specified module could not be found.)) in Unknown on line 0
[16-Jun-2018 20:17:30 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_ldap.dll' (tried: d:/wamp/bin/php/php7.2.6/ext/php_ldap.dll (The specified module could not be found.), d:/wamp/bin/php/php7.2.6/ext/php_php_ldap.dll.dll (The specified module could not be found.)) in Unknown on line 0
[16-Jun-2018 20:17:30 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_openssl.dll' (tried: d:/wamp/bin/php/php7.2.6/ext/php_openssl.dll (The specified module could not be found.), d:/wamp/bin/php/php7.2.6/ext/php_php_openssl.dll.dll (The specified module could not be found.)) in Unknown on line 0
[16-Jun-2018 20:17:30 UTC] PHP Deprecated:  Directive 'track_errors' is deprecated in Unknown on line 0

How can I get rid of the ldap error ? 如何摆脱ldap错误?

I ended up downloading and installing a new version of WAMP which included PHP 7.2.4. 我最终下载并安装了新版本的WAMP,其中包括PHP 7.2.4。 I then enabled the extension=php_ldap.dll . 然后,我启用了extension = php_ldap.dll I did not need to copy any other files 我不需要复制任何其他文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM