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

Re: ldap_bind PHP



That worked! Thank you. I've been pulling my hair out on this and
couldn't figure out why. Slapd was reporting protocol errors when using
"slapd -d 2" before specifying ldap_set_options. Now all is fixed,
authentication works.

I really appreciate your help.



On Sat, 2004-01-17 at 16:53, Stig Venaas wrote:
> On Sat, Jan 17, 2004 at 03:48:26PM -0500, Adam Williams wrote:
> > > 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:
> > > 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.
> > 
> > PHP is using LDAPv2 (I don't think it even supports LDAPv3 at this
> > point, it hasn't previously).  Check out the annotated PHP manual (on
> > their site),  this issue is documented.
> 
> It has for quite a while though not completely. Just like when using
> the C API, you need to specify v3 explicitly. So all you need, is
> 
> ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
> 
> prior to binding, where $ds is the connection identifier.
> 
> Stig
-- 
Kent L. Nasveschuk <kent@wareham.k12.ma.us>