On Wed, 17 Jan 2001, Jonathan Coker wrote:

> Hello,
>    I am trying to get information from an exchange server and LDAP looks
> like my best choice.  I have never used LDAP before but it appeared to be
> fairly straitforward.  I installed the OpenLDAP software on a Linux system
> running PHP 4.0.4 and apache 1.3.14.  It appears to let me create a
> connection and bind to  a directory but then I get an error about an object
> not being present:
>
>
> Got linkID of 1Got bindID of 1
> Warning: LDAP: Unable to perform the search: No such object in
> /pathtofile/ldapTest.php on line 23
>
> Here is the code (sanitized)
>  $linkID = ldap_connect("exchangeserver");
>
>       print("Got linkID of ".$linkID);
>
>       $bindID = ldap_bind($linkID,"cn=mylogin,cn=mycompany","mypassword");
>
>       print("Got bindID of ".$bindID);
>
>
>
>       $dn = "o=mycompany,ou=exchangeservername";
>       $filter="(|(cn=joe smith))";
>       $justthese = array( "ou", "sn", "givenname", "mail");
>
>         $result = ldap_search($linkID,$dn,$filter);  <<<<<<<<WARNING SHOWS
> AT THIS LINE
>
> <rest deleted>
>
> As I said, I am new to LDAP but I was assuming I could perform some kind of
> search to determine the schema and then access information based on that.
> Is this true, or do I need to know the layout to get to the data?
>
> Any help will be appreciated.
>
> Regards,
>
> Jonathan coker
>

Your filter is definitely wrong. Take the or operator ("|") out of it.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to