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

Re: ldap_bind PHP

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.