Bug #11845 Updated: ldap_mod_add/ldap_mod_del duplicating LDAP calls sporadically
| From: | derick@php.net | Date: | Sat, 25 May 2002 12:58:14 +0000 |
| Subject: | Bug #11845 Updated: ldap_mod_add/ldap_mod_del duplicating LDAP calls sporadically | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-8505@lists.php.net to get a copy of this message | ||
ID: 11845
Updated by: derick@php.net
Reported By: michael.jackson@lightyearcom.com
-Status: Open
+Status: Bogus
Bug Type: LDAP related
Operating System: Solaris 2.8
PHP Version: 4.0.5
New Comment:
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
Previous Comments:
------------------------------------------------------------------------
[2001-07-02 15:13:41] michael.jackson@lightyearcom.com
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 this bug report at http://bugs.php.net/?id=11845&edit=1