Query: ldap_errno
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
LDAP_ERRNO(3) 1 LDAP_ERRNO(3) ldap_errno - Return the LDAP error number of the last LDAP commandSYNOPSISint ldap_errno (resource $link_identifier)DESCRIPTIONReturns the standardized error number returned by the last LDAP command. This number can be converted into a textual error message using ldap_err2str(3).PARAMETERSo $link_identifier - An LDAP link identifier, returned by ldap_connect(3).RETURN VALUESReturn the LDAP error number of the last LDAP command for this link.EXAMPLESUnless you lower your warning level in your php.ini sufficiently or prefix your LDAP commands with @ (at) characters to suppress warning output, the errors generated will also show up in your HTML output. Example #1 Generating and catching an error <?php // This example contains an error, which we will catch. $ld = ldap_connect("localhost"); $bind = ldap_bind($ld); // syntax error in filter expression (errno 87), // must be "objectclass=*" to work. $res = @ldap_search($ld, "o=Myorg, c=DE", "objectclass"); if (!$res) { echo "LDAP-Errno: " . ldap_errno($ld) . "<br /> "; echo "LDAP-Error: " . ldap_error($ld) . "<br /> "; die("Argh!<br /> "); } $info = ldap_get_entries($ld, $res); echo $info["count"] . " matching entries.<br /> "; ?>SEE ALSOldap_err2str(3), ldap_error(3). PHP Documentation Group LDAP_ERRNO(3)
Related Man Pages |
---|
ldap_bind(3) - php |
ldap_control_paged_result(3) - php |
ldap_get_option(3) - php |
ldap_get_values(3) - php |
ldap_parse_result(3) - php |
Similar Topics in the Unix Linux Community |
---|
link LDAP-Users |
LDAP Connection Issue on Apache Web Server |
Ldap connection - showstopper after hosted |