|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-05-25 08:58 UTC] derick@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 15:00:01 2025 UTC | 
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.