If you are a Windows user, this is a common error when you use XAMPP
since LDAP
is not enabled by default.
You can follow this steps to make sure LDAP
works in your XAMPP
:
[Your Drive]:xamppphpphp.ini
: In this file uncomment the following line:
extension=php_ldap.dll
Move the file: libsasl.dll
, from [Your Drive]:xamppphp
to [Your Drive]:xamppapachein
(Note: moving the file is needed only for XAMPP prior to version: 5.6.28
)
Restart Apache.
You can now use functions of the LDAP Module!
If you use Linux:
For php5:
sudo apt-get install php5-ldap
For php7:
sudo apt-get install php7.0-ldap
If you are using the latest version of PHP you can do
sudo apt-get install php-ldap
running the above command should do the trick.
if for any reason it doesn't work check your php.ini configuration to enable ldap, remove the semicolon before extension=ldap
to uncomment, save and restart Apache
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…