Open
Description
Description
According to site: https://bugs.php.net/bug.php?id=69574
I added LDAP_OPT_TIMEOUT to enforce bind operation time out. This worked for ldap protocol. But not for ldaps protocol.
steps to reproduce:
In one ssh session, I am running the following command to simulate a socket listener:
nc -l 636
And run following code:
<?php
$ldap = ldap_connect('ldaps://127.0.0.1:636');
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 3);
ldap_set_option($ldap, LDAP_OPT_TIMELIMIT, 3);
ldap_set_option($ldap, LDAP_OPT_TIMEOUT, 3);
ldap_bind($ldap);
?>
Resulted in this output:
This never times out
But I expected this output instead:
times out in 3 seconds.
PHP Version
PHP 7.4.30
Operating System
Windows 10