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

Re: how do you enable protocol version 2 support?

You put that command in whatever file is doing the ldap_connect.



$conn = ldap_connect('');
ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION, 3);
$bind = ldap_bind....

Check out www.php.net for more examples... specifically:


> ok, i just added....
> ldap_set_option($connectId, LDAP_OPT_PROTOCOL_VERSION, 3);
> to my php.ini  file but it did not do any good. i am still getting:
> Could not bind to ldap server: Protocol error
> when trying to run phpqladmin. the only way i have been able to get the
> script to run was to enable v2 support in openldap but i really dont
> want to do that and would rather use v3. i am using php-4.3.1 via the
> mod option to apache.
> Thanks in advance.
> Ming Deng wrote:
>> BsD JuNkiE wrote:
>>> How do you enable protocol v2 support in openldap 2.1.x? I am trying
>>> to get a php / ldap script (phpQLADMIN) to work and unfortunately php
>>>  only supports ldapV2 so i am getting unable to bind to ldap server:
>>> protocol error. I found in the documentation the difference between
>>> the two protocols but not how to enable v2.
>>> Thanks in advance and have a great day.
>> By default, php-ldap(it is a rpm come with php)  use protocol 2.  You
>> can set php to use protocol 3 by:
>> ldap_set_option($connectId, LDAP_OPT_PROTOCOL_VERSION, 3);
>> Ming