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

Re: PHP and ldap_bind function problem



Thanks for the reply.

Yes. When I use ldap_search to test that, it returns the correct info for the user.

On Dec 15, 2004, at 12:03 PM, Olivier Doisneau wrote:

$con=ldap_connect($server);
$ldap= ldap_bind($con, $binddn,$bindpwd) or die ("could not connect to ldap");

Do you have the correct server for $connect?

Just cut and pasted my info.

Olivier Doisneau



-----Original Message-----
From: owner-openldap-software@OpenLDAP.org [mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of Dennis Putnam
Sent: Wednesday, December 15, 2004 11:47 AM
To: OpenLDAP-software@OpenLDAP.org
Subject: PHP and ldap_bind function problem

I am having a problem authenticating users via the ldap_bind function. 
I think this is more of an LDAP question then PHP so I am hoping 
someone here has sufficient experience with both to help me. Here is 
the troubling code:

$bind=ldap_bind($connect,"uid=".$username.",dc=mydomain,dc=com",$_POST['
password']);

I don't know what kind off error I will get for an invalid password but 
I know the password in my testing is correct. I am guessing an invalid 
password will give me a different error but here is the one I get:

Warning: ldap_bind(): Unable to bind to server: Protocol error in 
/Library/WebServer/Documents/emailchpw.php on line 70

My 'ldap_connect' call returned successfully so the value of '$connect' 
is good. Can someone at least tell me what this error means? TIA.

Dennis Putnam
Sr. IT Systems Administrator
AIM Systems, Inc.
11675 Rainwater Dr., Suite 200
Alpharetta, GA  30004
Phone: 678-297-0700
FAX: 678-297-2666 or 770-576-1000
The information contained in this e-mail and any attachments is 
strictly confidential. If you are not the intended recipient, any use, 
dissemination, distribution, or duplication of any part of this e-mail 
or any attachment is prohibited. If you are not the intended recipient, 
please notify the sender by return e-mail and delete all copies, 
including the attachments.



This message contains information which may be confidential and privileged. Unless you are the intended recipient (or authorized to receive this message for the intended recipient), you may not use, copy, disseminate or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail, and delete the message. Thank you very much.




Dennis Putnam
Sr. IT Systems Administrator
AIM Systems, Inc.
11675 Rainwater Dr., Suite 200
Alpharetta, GA 30004
Phone: 678-297-0700
FAX: 678-297-2666 or 770-576-1000
The information contained in this e-mail and any attachments is strictly confidential. If you are not the intended recipient, any use, dissemination, distribution, or duplication of any part of this e-mail or any attachment is prohibited. If you are not the intended recipient, please notify the sender by return e-mail and delete all copies, including the attachments.