[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
ldap_rename() returns Protocol error?
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).
This is where things get interesting. From servers/slapd/modrdn.c, line ~82:
if ( ber_peek_tag( op->o_ber, &length ) == LDAP_TAG_NEWSUPERIOR ) {
if ( op->o_protocol < LDAP_VERSION3 ) {
/* Conection record indicates v2 but field
* newSuperior is present: report error.
*/
Debug( LDAP_DEBUG_ANY,
"modrdn(v2): invalid field newSuperior!\n",
0, 0, 0 );
send_ldap_disconnect( conn, op,
LDAP_PROTOCOL_ERROR, "newSuperior requires LDAPv3" );
rc = SLAPD_DISCONNECT;
goto cleanup;
}
[...]
If I turn up debugging on the slapd in question it is, in fact, logging
"modrdn(v2) invalid field newSuperior!", so this is where I'm getting
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.
Anyone have thoughts on this? I'm really at a loss at this point.
thanks,
john
--
John Morrissey _o /\ ---- __o
jwm@horde.net _-< \_ / \ ---- < \,
www.horde.net/ __(_)/_(_)________/ \_______(_) /_(_)__