Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2003022

[PHP] LDAP error error From: Todd Rosenberry (Todd.Rosenberry <email protected>)
Date: 02/21/03

    I am getting bizarre results from ldap_errno and ldap_error. I am
using PHP 4.0.4pl1, iPlanet web server 4.1SP7 and iPlanet LDAP server
4.16. As a test I am trying to add an entry to LDAP that already
exists. The link and bind to LDAP work properly and the LDAP log show
the correct behavior:

[20/Feb/2003:11:07:05 -0800] conn=330913 op=3 ADD
dn="cn=test4,ou=aliases,ou=Services,dc=mycompany,dc=com"
[20/Feb/2003:11:07:06 -0800] conn=330913 op=3 RESULT err=68 tag=105
nentries=0 etime=1

but my output is:

Adding cn=test4,ou=Aliases,ou=Services,dc=mycompany,dc=com
Warning: LDAP: add operation could not be completed. in
/export/vol1/intranet/alias/ldaptest.php on line 30
ERROR: Unknown error (51151544)

Here is a snippet of the code:

print "Adding $entryDN<BR>\n";
$ok = ldap_add($ldlink,$entryDN,$attrs);
if (!$ok) {
   $lderrstr = ldap_error($ldlink);
   $lderrno = ldap_errno($ldlink);
   print "ERROR: $lderrstr ($lderrno)<BR>\n";
}

Thanks,
- Todd