Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ldap = ldap_connect("ldap.example.com");
- $user = "exampleUser";
- $pass = "examplePass";
- if($bind = ldap_bind($ldap, $user, $pass)) {
- // logged in
- } else {
- // error message
- }
- ?>
- copy "C:wampbinphpphp5.4.16libsasl.dll" "C:wampbinapacheapache2.4.4binlibsasl.dll"
- ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
- ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
- ldap_set_option($ldap, LDAP_OPT_DEBUG_LEVEL, 7);
- if(!$ldap){
- echo "LDAP Failed To Connect: ".ldap_error($ldap);
- }
- SET PATH=C:wampbinphpphp5.3.13;%PATH%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement