I'm using WAMP and trying to run something like the following:
<?php
$ldap = ldap_connect("ldap.example.com");
$user = "exampleUser";
$pass = "examplePass";
if($bind = ldap_bind($ldap, $user, $pass)) {
// logged in
} else {
// error message
}
?>
Before doing this though, I tried running phpinfo() to see if ldap was installed, and it doesn't appear anywhere.
I've tried the following:
- Uncommented the following line in php.ini: extension=php_ldap.dll
- Copied these files into the same directory as php.ini: ssleay32.dll and libeay32.dll
- Added the following to my environment variables: C:\wamp\bin\php
- Restarted after doing any of these.
I don't really know what I'm doing, but these were the suggestions I found online. Any help would be appreciated!