Re: ldap_bind issues




"mtuller" <mituller@xxxxxxxxx> wrote in message
news:0d13e96c-00e9-4fbe-837b-76d3a414c98d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have been attempting to do a bind to an LDAP server that requires
SSL. No matter what I do though, the bind fails. I have tried
everything I can think to try, but this is not working. The server
admins think the server is setup correctly, but I am beginning to
think differently. Here is the code I have:

<?php

$surname = "T";

//Connect
$connect = ldap_connect("ldaps://ldapserver.com", "636");

ldap_set_option($connect, LDAP_OPT_PROTOCOL_VERSION, 3);

//Bind to the ldap directory
$bd =
ldap_bind($connect,"cn=me,ou=People,o=work,c=US","password")
or die("Couldn't bind to LDAP server!");

$filter="(|(sn=$surname*))";

//Search the directory
$result = ldap_search($connect, "ou=People,o=work,c=US",
$filter);

//Create result set
$entries = ldap_get_entries($connect, $result);

//Sort and print
echo "User count: " . $entries["count"] . "<br /><br
/><b>Users:</
b><br />";

for ($i=0; $i < $entries["count"]; $i++)
{
echo $entries[$i]["displayname"][0]."<br />";
}

ldap_unbind($connect);
?>

Hi,
any messages returned?

R.


.



Relevant Pages

  • Re: ldap_bind issues
    ... No matter what I do though, the bind fails. ... admins think the server is setup correctly, ...
    (comp.lang.php)
  • Re: f11: Cannot add LDAP directory server to thunderbird-3.0b3
    ... I tried to add a LDAP directory server to thunderbird-3.0b3, ... searchfilter: ... I did not look in the tables of address books after having added the ldap directory to the address books. ...
    (Fedora)
  • How to enable SHA-1 on AIX LDAP clients
    ... I am trying to configure my LDAP directory to support encrypted ... should be configured on the client. ... appears that the ldapmodify command is only for the server. ...
    (comp.unix.aix)
  • Re: Outlook 2003 - LDAP Directory Server
    ... Outlook I get a screen that askes for Exchange server info (which I don't ... have) and LDAP directory info before entering the Outlook Inbox page. ...
    (microsoft.public.outlook)
  • Re: How to remove non-existent domain from domain lists
    ... This did not resolve the problem. ... ldap directory. ... The current FSMO happens to be to old testing server that had the test ... domain of olddomainad setup on it. ...
    (microsoft.public.win2000.active_directory)