Bug #69574 [NEW]: ldap timeouts not enforced
From: ryan dot brothers at gmail dot com
Operating system: Linux
PHP version: 5.6.8
Package: LDAP related
Bug Type: Bug
Bug description:ldap timeouts not enforced
Description:
------------
I am trying to simulate a LDAP server timing out. I'm setting the
options LDAP_OPT_NETWORK_TIMEOUT and LDAP_OPT_TIMELIMIT, but the script
runs indefinitely without timing out.
In one ssh session, I am running the following command to simulate a
socket listener:
nc -l 1234
If I run the below script in a second ssh session, it runs forever and
never times out.
Is there a way to have this script timeout after a certain number of
seconds?
Test script:
---------------
<?php
$ldap = ldap_connect('127.0.0.1:1234');
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 3);
ldap_set_option($ldap, LDAP_OPT_TIMELIMIT, 3);
ldap_bind($ldap);
Expected result:
----------------
Script times out in 3 seconds.
Actual result:
--------------
Script never times out.
--
Edit bug report at https://bugs.php.net/bug.php?id=69574&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69574&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69574&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69574&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69574&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69574&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69574&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69574&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69574&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69574&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69574&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69574&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69574&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69574&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69574&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69574&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69574&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69574&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69574&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69574&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69574&r=mysqlcfg
Thread (12 messages)
- ryan dot brothers at gmail dot com
- mcmic@php.netBug #69574 [Com]: ldap timeouts not enforced
- mcmic@php.netBug #69574 [Com]: ldap timeouts not enforced
- mcmic@php.netBug #69574 [Com]: ldap timeouts not enforced
- mcmic@php.netBug #69574 [Opn->Asn]: ldap timeouts not enforced
- mcmic@php.netBug #69574 [Com]: ldap timeouts not enforced
- mcmic@php.netBug #69574 [Asn->Csd]: ldap timeouts not enforced
- tanjh58 at hotmail dot comBug #69574 [Com]: ldap timeouts not enforced
- requinix@php.netBug #69574 [Csd]: ldap connection timeouts not enforced
- heiglandreas@php.netBug #69574 [Csd]: ldap connection timeouts not enforced
- tanjh58 at hotmail dot comBug #69574 [Com]: ldap connection timeouts not enforced
- tanjh58 at hotmail dot comBug #69574 [Com]: ldap connection timeouts not enforced