SPD
SPD

Reputation: 247

how to read LDAP error codes

I am having trouble reading ldap error codes. Is there any method or an API to read ldap error codes/sub error codes.Right now I am parsing the exception message and getting the error code. I believe there will be a simple way of extracting codes?

Padur

Upvotes: 1

Views: 1774

Answers (1)

erKURITA
erKURITA

Reputation: 407

PHP has a function called ldap_errno() that returns a string based on the error code.

There is also a comment that has a list of common LDAP error codes, dated April 11th, 2002 but very accurate: http://php.net/manual/en/function.ldap-errno.php#20665

Other than this, you could write your own program/script to parse the error, since you now know what each code means.

Upvotes: 2

Related Questions