Re: ldap_list()

From: Date: Wed, 14 May 2003 16:31:36 +0000
Subject: Re: ldap_list()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147607@lists.php.net to get a copy of this message
What I was trying to do was to pull out all the departments. My idea was to have a search page, and have the departments listed in a drop-down menu that you would select what departemt you want to search by. ldap_search works for me, ldap_list doesn't. I have also tried running the script below, and an example script from a book on a RedHat 9 server, and I get the same thing. A blank page. My guess is that it is something with the Exchange server. The admins don't have a clue how to work with it though. They hire consultants in to do any real work on it, so I may be out of luck in ever getting this to work. Maybe with the upgrade to Exchange 2000 or when they finally get the Novell LDAP server working. Thanks, Mike On Wednesday, May 14, 2003, at 11:16 AM, BigDog wrote:
The best way to work with exchange is to work with your exchange sys admin and see if you can get it working together. Exchage follows some of the LDAP standards, however, I have seen it do things that are far from the standards. What i have done in the past is to pull everything out of exchange and then used php to get only the information that i need. For example, pull all departments and then only get the one that you want. -- Ray On Wed, 14 May 2003, Mike Tuller wrote:
My apologies, I am running on OS X with PHP 4.3.0 and the LDAP server I am connecting to is an Exchange 5.5 server. On Wednesday, May 14, 2003, at 10:32 AM, BigDog wrote:
Supply this info: 1. What OS is php running on? 2. What type of ldap server are u using? - Ray On Wed, 14 May 2003, Mike Tuller wrote:
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! $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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#147607) next »