问题
I want to enable LDAP module on my XAMPP Windows 10, here's the few solutions that I've tried :
- Copy dll files to System and System32 and uncomment extension=php_ldap.dll in php.ini, both development and production.
- Copy libsasl.dll to xampp/apache/bin
None of these working, when I opened phpinfo() there is no ldap info showing, which means the ldap hasn't been able to installed. I also added PHP in Windows Path with no success, but either my approach is wrong or that wasn't a solution. Any help appreciated.
回答1:
I just ran into the same issue and the link you provided How to enable LDAP extension in XAMPP environment ended up being the solution for me.
I copied libeay32.dll and ssleay32.dll from C:/Ampps/php to C:/Windows/System32. I made sure neither of these files were in C:/Windows/System. From there I enabled extension=php_ldap.dll in the php.ini file. Ampps has a list you can enable php.ini dll's and if I remember right so does XAMPP. The last step is to just restart Apache and you should be good to go.
I'm using Windows 10 with Ampps instead of XAMPP but have to think they are pretty close.
回答2:
Make sure the
path\to\xampp\php
directory has the following files- libeay32.dll
- libsasl.dll
- ssleay32.dll
Usually, you can find these files in path\to\xampp\sendmail
- this library also uses them. But if not, try to search for them inside the xampp directory.
Uncomment or add the
ldap
extension in thephp.ini
(path\to\xampp\php\php.ini
) fileextension=ldap
Restart the server
- Make sure the
path\to\xampp\php
directory is set in the system environment variablePATH
. To know how to do it, see this post.
来源:https://stackoverflow.com/questions/47047619/enable-ldap-on-xampp-windows