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

Re: PHP and LDAPv3



>
>if i config my OpenLDAP2 v. 2.0.23 server with,
>- ------------< snip <------< snip <------< snip <------------
>require bind authc LDAPv3
>- ------------< snip <------< snip <------< snip <------------
>php4.1.1 cannot connect
>if i set it to
>- ------------< snip <------< snip <------< snip <------------
>require bind authc
>- ------------< snip <------< snip <------< snip <------------
>it works fine.
>...so does this mean PHP does not support LDAPv3 ?

It defaults to version 2.

Try something like  -

if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3))
    echo "Using LDAPv3";
else
    echo "Failed to set protocol version to 3";

The ldap_set_option() call has to be after ldap_connect() and before 
ldap_bind()

-- 
-----------------------------------------------------------
Ximian GNOME, Evolution, LTSP, and RedHat Linux + LVM & XFS
-----------------------------------------------------------