On Wed, Aug 14, 2002 at 02:18:58AM -0700, Roger Thomas wrote: > built: php-4.2.2 with openldap 2.0.25 > > i tried using the ldap_rename function to modify the dn of my ldap db but > nothing seems to happen. the record was not change at all. i have followed > closely the code-snippet that was given by Mr Stig Venaas at: > http://marc.theaimsgroup.com/?l=php-general&m=100949195224325&w=2
But you're not doing what I wrote... > // we want to transfer user roger from Civil Engineering to Credit section in > Finance > $r=ldap_rename($ds, > "uid=roger,ou=People,ou=Civil,o=Engineering,dc=mydomain,dc=net", > "uid=roger,ou=People,ou=Credit,o=Finance,dc=mydomain,dc=net", > "dc=mydomain,dc=net",TRUE); The third parameter should be the new rdn (which is the same as the old), and the fourth should be new parent. So it should look like this: $r=ldap_rename($ds, "uid=roger,ou=People,ou=Civil,o=Engineering,dc=mydomain,dc=net", "uid=roger", "ou=People,ou=Credit,o=Finance,dc=mydomain,dc=net", TRUE); Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php