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

Re: ldap_rename() returns Protocol error?



On Tue, Oct 16, 2001 at 02:00:54PM -0400, John Morrissey wrote:
> I'm unsure of exactly where my problem lies; I've read the PHP code where it
> calls ldap_modrdn2_s() (IIRC) and it seems pretty straightforward. If this
> sounds like a problem in the PHP code, though, please feel free to point me
> in their direction.
> 
> I'm calling PHP's ldap_rename() function, which is returning Protocol error
> (LDAP_PROTOCOL_ERROR). Before calling ldap_rename(), I set the protocol
> version to 3:
> 
> ldap_set_option($this->link, LDAP_OPT_PROTOCOL_VERSION, 3);
> 
> which completes successfully. If I then ldap_get_option() to find the
> protocol version, it returns version 3 (as expected).

I think this will work if you set the version before you bind to the
server.

> LDAP_PROTOCOL_ERROR from. This seems to indicate that PHP isn't setting the
> protocol version properly, even though ldap_get_option() returns protocol
> version 3.

As I said above I think you need to do it before you bind, I'm not so
sure if it should return the value you set it to or the protocol
currently used. I think the latter sounds reasonable.

Stig