ReckittBenckiser
Programmer
Hi all. I've never really used LDAP before, but I'd like to be able to get PHP to commune with ActiveDirectory using LDAP as the medium. Here is the code I'm using:
I'm getting "Warning: ldap_search() [function.ldap-search]: Search: Operations error in G:\inetpub\ on line 14" as an error when I attempt to execute this script.
Any *pointers (pun intended)? lol
Code:
<?php
$con = ldap_connect("ldap://ALPHA.RB.NET");
if($con)
{
$bind = ldap_bind($con);
$dn = "DC=alpha,DC=rb,DC=net";
$filter = "(cn=*)";
$search = array("displayname", 1);
$result = ldap_search($con, $dn, $filter, $search);
}
else
{
echo "Couldnt connect <br>";
}
?>
I'm getting "Warning: ldap_search() [function.ldap-search]: Search: Operations error in G:\inetpub\ on line 14" as an error when I attempt to execute this script.
Any *pointers (pun intended)? lol