ldap_err2str

string ldap_err2str(int errno) 

Returns the text explanation for the given LDAP error code.

Returns:

String representation of the numeric error code

Description:

Converts the integer error code into the correct LDAP error explanation. Used for the codes returned from ldap_errno().

Availability:

UNIX/Linux, Windows

Version:

3.0.13+, 4.0RC2+

Example:

Fetch the last LDAP error message
$errno = ldap_errno($ldapid); 
$error_text = ldap_err2str($errno); 
echo "Error $errno: $error_text\n"; 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.