ldap_list()

From: Date: Tue, 13 May 2003 20:54:22 +0000
Subject: ldap_list()
Groups: php.general 
Request: Send a blank email to php-general+get-147494@lists.php.net to get a copy of this message
I am trying to get ldap_list to list all the departments that are entered into the ldap server. I have modified the example that it in the manual. Here is what I have. $ldap=ldap_connect("myldapserver"); // must be a valid LDAP server! // $ds is a valid link identifier for a directory server $basedn = "o=ISD11, c=US"; $department = array("department"); $sr=ldap_list($ldap, $basedn, "department=*", $department); $info = ldap_get_entries($ldap, $sr); for ($i=0; $i<$info["count"]; $i++) {
    echo $info[$i]["department"][0] ;
} When I run this, I get an empty page back. I know that department information is there, but nothing is returned. Am I doing something wrong here? Mike

« previous php.general (#147494) next »