Bug with ldap_mod_replace

From: Date: Wed, 20 Sep 2000 16:48:20 +0000
Subject: Bug with ldap_mod_replace
Groups: php.general 
Request: Send a blank email to php-general+get-17272@lists.php.net to get a copy of this message
I'm trying to use ldap_mod_replace to change a user's password in LDAP, but am getting weird behavior with the function call. The following sinippet of code works as expected: print "<P>Going to do ldap replace now for user $uid to password $password1 (eventually)\n"; $dn="cn=root,dc=netraverse,dc=com"; $ldap=ldap_connect($ldap_server); if (!(ldap_bind($ldap,$dn,"[Root Password Here]"))) { die ("Could not bind\n"); } $userdn="uid=$uid,ou=people,dc=netraverse,dc=com"; $entry["userpassword"] = MakeEncPw($password1); print "<P>Encrypted password is " . $entry["userpassword"]; #$rc = ldap_mod_replace($ldap,$userdn,$entry); ldap_close($ldap); } } ?> It prints out on the web page that gets returned when you submit a form the "Going to do ldap replace" and whatnot. However, if I uncomment the ldap_mod_replace line, and hit submit on the web form, nothing happens. There's a brief flash of activity, but the page doesn't move on to the submission results - it just sits there, displaying the form with my text typed into it, like I'd never hit the submit button. Is there a known issue in ldap_mod_replace? Why does that one line break my form? Thanks, Wade

« previous php.general (#17272) next »