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

ldap_bind PHP



Hello,

I don't know if this is the forum for this but here it goes. I have a
good deal of experience using LDAP for Samba backend. Now I'm working on
using OpenLDAP for authentication of web users access a PostgreSQL
database.

Specifically:
Users are presented with login screen. They login with username and
password.

user name is prepended to users container using PHP and I use function
ldap_bind as follows:



example:

$username and $password are passed by the login screen

My dn: uid=kent,ou=users,dc=tow,dc=net

$bind = ldap_bind($connect, "$bindn", $password)
$bindn="uid=$username,$basedn";
$basedn='ou=users,dc=tow,dc=net';

ldap_bind consistently fails and I don't know why.

When I put slapd in debug mode "slapd -d 3", credentials are sent as
well as password. I compared this to using JXplorer with same
credentials to bind and search using command line with "ldapsearch".
When you look at what transpires on the screen the difference seems to
be the message "requested protocol version not allowed" when using PHP
to access the LDAP server.

I have to tell you that this has to be a syntax error somewhere. I have
been able to to query the LDAP directory with anonymous bind, just not
with specific user and password over PHP.


Any help would be appreciated. Getting pretty frustrated with this.


-- 
Kent L. Nasveschuk <kent@wareham.k12.ma.us>