hi there,

this has been posted before, but any hints i can find do get me further.

this is my code:

	$ds=ldap_connect($ldaphost,$ldapport);
	if ($ds) {
	   if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) {
	   } else {
	       echo "Failed to set protocol version to 3";
	   }
	   $r=@ldap_bind($ds, $dn_uid, $searchpass);
	   if ($r) {
		   # hier änderungen im verzeichnis durchführen
		   if (($_POST["mailreply"]) && ($_POST["mailfwd"])) {
			   $info["mailReplyText"] = $_POST["mailreply"];
			   $info["mailForwardingAddress"] = $_POST["mailfwd"];
-->>		   $r=ldap_modify($ds, $dn_uid, $info);
		   }

	   # values aus directory auslesen, um vorbelegung für form zu erhalten
	   $entry=ldap_first_entry($ds,$sr);
	   $values=@ldap_get_values($ds, $entry, "mailReplyText");
	   $mailreply="$values[0]";
	   $values=@ldap_get_values($ds, $entry, "mailForwardingAddress");
	   $mailfwd="$values[0]";
   } else {
	   echo "FEHLER: Anmeldung ungültig";
   }
   ldap_close($ds);
} else {
   echo "<h4>Unable to connect to LDAP server</h4>";
}

currently the ldap_modify call does not work as intended. i get a warning "Unknown attribute in the data in <line where ldap_modify is>". i already played around with ldap_mod_replace and all other variants of that command, all resulting in the same warning. the attributes in question are no default ldap attributes, they are defined in the qmail.schema of the qmail.ldap package. does the code have to know about my attributes?? hope not.

do you have any clue for me what to do?

thanks for any help in advance

sebastian

    Write a Reply...