ldap_rename refused to work

From: Date: Wed, 14 Aug 2002 09:18:58 +0000
Subject: ldap_rename refused to work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-112501@lists.php.net to get a copy of this message
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 following is my short code to do this: <? //connect to LDAP $ds=ldap_connect("192.168.10.222"); if (!$ds) { echo "Connection to LDAP server failed<br><br>"; exit(); } if (!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { echo "Failed to set protocol version"; exit; } //we bind to ldap server AFTER the ldap_set_option is successfull //this is an authenticated bind $r=ldap_bind($ds,"cn=admin,o=Administrators,dc=mydomain,dc=net", "secret"); if (!$r) { echo "LDAP bind failed<br><br>"; exit(); } // 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); //Close the LDAP connection. ldap_close($ds); print "modification done"; ?> please advise. -- roger __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com

« previous php.general (#112501) next »