[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LDAP and PHP

Add "print ldap_error($l);" after the ldap_bind.  If it is successful then
it will say "success", but since you are having problems it mostly likely
will point you in the right direction.

If it is the protocol version like Thomas says, it will return "Protocol
Error" or some such error.


> On Fri, 2003-09-12 at 12:13, Charaf Ech-Chatbi wrote:
>> Hello every body:
> hi,
>>  I try to use LDAP with PHP.  I am able to connect but not to bind
>> ???  It return me the famous error message
>> Warning: LDAP: Unable to bind to server: Can't contact LDAP server in
>> /users/sys/charaf/public_html/ok.php on line 24
> did you configure the protocol version?
> try:
> $l = ldap_connect(host);
> ldap_set_option($l,LDAP_OPT_PROTOCOL_VERSION,3);
> $rc = ldap_bind($l);
> hth,
> tom.
> --
> Thomas "Duke" Hager         | "Microsoft is not the answer.
> duke@{bofh.at,1012surf.net} |  Microsoft is the question.
> thomas.hager@1012surf.net   |  NO is the answer."
>                                        Erik Naggum.