From:             [EMAIL PROTECTED]
Operating system: Solaris 2.8
PHP version:      4.0.5
PHP Bug Type:     LDAP related
Bug description:  ldap_mod_add/ldap_mod_del duplicating LDAP calls sporadically

PHP is linked against the IPlanet LDAP SDK v5.0, using --ldap=/usr/local/ldap

ldap_mod_add and ldap_mod_del seem to sporadically duplicate LDAP calls....  Take the 
following function.

function addtogroup($ds, $username, $groupname) {
  $addme["memberuid"] = #username;
  $dn = "cn=".$groupname.", ou=group, dc=ltyr, dc=net";
  $res = ldap_mod_add($ds, $dn, $addme);
  echo "Hi - I've run!";
  if ($res) {
    return TRUE;
  else {
    $errstr = ldap_error($ds);
    echo "Ldap error: $errstr<p>";
    return FALSE;

In this function, I added the "echo" statement to make sure that ldap_mod_add is only 
being called once.  It is.  Yet, I sporadically get errors stating "Type or value 
exists", along with a PHP warning: "LDAP: modify operation could not be completed" - 
in addition, I see the MOD line come through the LDAP logs twice.  However, the 
attribute is always deleted / added correctly.

There seems to be no consistency to this whatsoever.

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to