I'm trying to modify a user's password in LDAP using PHP4.02 compiled into Apache.
The following bit of code will return valid HTML output to the screen:
$ldap=ldap_connect($ldap_server);
if (!(ldap_bind($ldap,$dn,"Aspw4aC!")))
{
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);
However, if I uncoment the ldap_mod_replace line, and press "submit" on the web form, nothing seems to happen with the page. The entries I typed into the form are still there and the "Encrypted password" line doesn't get printed.
Does anyone know of problems in ldap_mod_replace?