problem with LDAP functions in PHP


I've been trying some LDAP functions in PHP and am stuck at trying to bind to the LDAP server.


basically i've successfully queried using some LDAP functions when it comes to querying a single server but when I try to do it via an array, i get errors that say "unable to bind to server".

eg. of my script:

this works:

if ($ds) {
$r=ldap_bind($ds, "john", "h92de" );

this doesn't work:

$servers = array("afd-s-31","afd-s-33");

for ($i=0;$i";

The error occurs on the line with ldap_bind().


another thing when i do a search filter, i get this error message:
LDAP: Unable to perform the search: Bad search filter

$dn = "OU=User Accounts,OU=User Directory,DC=xyz,DC=com";

$sr=ldap_search($ds, $dn, $filter);

can anyone spot anything wrong with my LDAP search filters?

thanks for any help.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!