Re: ldap_bind issues
- From: "Richard" <root@localhost>
- Date: Tue, 30 Dec 2008 02:10:58 +0100
"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.
.
- Follow-Ups:
- Re: ldap_bind issues
- From: mtuller
- Re: ldap_bind issues
- References:
- ldap_bind issues
- From: mtuller
- ldap_bind issues
- Prev by Date: Re: Query String
- Next by Date: sorting columns in a client-side page
- Previous by thread: ldap_bind issues
- Next by thread: Re: ldap_bind issues
- Index(es):
Relevant Pages
|