ldap_set_option not setting timeout option
I'm using ldap_connect to work with an LDAP server from an PHP
application, which works fine. Now I need to set timeouts, so that an
request will be canceled if it runs to long. For this I set the following
options with the following lines of code:
$ldapconn = ldap_connect($ldap['host'], $ldap['port'])
or myExClass::throwException("unable to connect");
echo LDAP_OPT_TIMELIMIT;
ldap_set_option ($ldapconn, LDAP_OPT_TIMELIMIT,1);
ldap_set_option ($ldapconn, LDAP_OPT_NETWORK_TIMEOUT,1);
echo LDAP_OPT_TIMELIMIT;
The echo are inserted for debugging. In this example I found out, that the
option LDAP_OPT_TIMELIMIT is unchanged 4. Before and after
ldap_set_option.
Why that option is not changed? What could be the reason? By the way: the
return code of ldap_set_optionis 1 in both cases.
No comments:
Post a Comment