Copied this script from php.net and put in an incorrect url. For some reason this script does not die even when the connection details are totally wrong.
$ldaphost = "notaldapurl.com";
$ldapport = 389;
$ldapconn = ldap_connect($ldaphost, $ldapport)
or die("die not connect to $ldaphost");
var_dump($ldapconn);
The out put for this script is resource(2) of type (ldap link)
Additional info is that i'm running php 5.5
From the documentation...
When OpenLDAP 2.xx is used, ldap_connect() will always return a resource as it does not actually connect but just initializes the connecting parameters. The actual connect happens with the next calls to ldap_* funcs, usually with ldap_bind().
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.