php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #24984 ldap_rename function don't rename dn
Submitted: 2003-08-08 08:47 UTC Modified: 2003-08-08 08:59 UTC
From: alban dot medici at fr dot netcentrex dot net Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 4.3.1 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alban dot medici at fr dot netcentrex dot net
New email:
PHP Version: OS:

 

 [2003-08-08 08:47 UTC] alban dot medici at fr dot netcentrex dot net
Description:
------------
THE ldap_rename function DOES NOT support renaming dn !
in fact it's much an ldap_move function than ldap_rename instead of C API !

If you try to rename an object such as :

$objectdn = "uniqueID=MyObject-12".$parentDN;
$newObjectdn = "uniqueID=MyObject-12a";
$parentDN = "ou=MyObjectClass,ou=mycontainer,ou=mycompagny";
the function:
ldap_rename($LDAPds,$objectdn,$newObjectdn,$parentDN,true);
or 
ldap_rename($LDAPds,$objectdn,$newObjectdn,NULL,true);
will NOT work and will not return any error message by 
ldap_error($LDAPds);

Reproduce code:
---------------
//If you try to rename an object such as :

$objectdn = "uniqueID=MyObject-12".$parentDN;
$newObjectdn = "uniqueID=MyObject-12a";
$parentDN = "ou=MyObjectClass,ou=mycontainer,ou=mycompagny";
//the function:
ldap_rename($LDAPds,$objectdn,$newObjectdn,$parentDN,true);
//or 
ldap_rename($LDAPds,$objectdn,$newObjectdn,NULL,true);
//will NOT work and will not return any error message by 
ldap_error($LDAPds);
// return no error


Expected result:
----------------
modification of object dn

Actual result:
--------------
no modification

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-08 08:56 UTC] sniper@php.net
PHP ldap_rename() is just wrapper to ldap_rename_s() and behaves exactly as that does. Not PHP bug -> bogus.

 [2003-08-08 08:59 UTC] alban dot medici at fr dot netcentrex dot net
now it's may be more a documentation Bug ?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 04 23:01:33 2025 UTC