Re: ldap_rename refused to work

From: Date: Wed, 14 Aug 2002 16:08:06 +0000
Subject: Re: ldap_rename refused to work
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-112550@lists.php.net to get a copy of this message
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

« previous php.general (#112550) next »