note 34849 added to function.ldap-rename

From: Date: Fri, 08 Aug 2003 13:05:19 +0000
Subject: note 34849 added to function.ldap-rename
Groups: php.notes 
Request: Send a blank email to php-notes+get-53644@lists.php.net to get a copy of this message
bug report 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); to rename a dn and not only move an object You have to read all attributes of you object (uniqueID=MyObject-12) keep them in memory delete your object then create your new object (MyObject-12a) by using the basic ldap functions hope new versions can fix this behavior ---- Manual Page -- http://www.php.net/manual/en/function.ldap-rename.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34849 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34849&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34849&report=yes

« previous php.notes (#53644) next »