#32688 [NEW]: stream_set_timeout does not work
From: rene dot vogt at cnlab dot ch
Operating system: Windows 2003 Server
PHP version: 5.0.4
PHP Bug Type: Sockets related
Bug description: stream_set_timeout does not work
Description:
------------
The function stream_set_timeout seems not to work on php 5.0.4 (win32). It
worked with earlier php versions.
The sample code connects to a page on a server which prints out a dot
every second. After 3 seconds the script should terminate.
http://verkehr.cnlab.ch/test1.php (sample code)
http://verkehr.cnlab.ch/test2.php (produces dots)
Reproduce code:
---------------
<?php
$fp = fsockopen("verkehr.cnlab.ch", 80, $errno, $errstr, 3);
if (!$fp) {
return "Error connecting";
} else {
stream_set_timeout($fp, 3);
fwrite($fp,"GET /test2.php HTTP/1.0\r\nHost:
verkehr.cnlab.ch:80\r\nConnection: Close\r\n\r\n");
while (!feof($fp)) {
echo fread($fp, 512);flush(); ob_flush();
}
fclose($fp);
}
?>
Expected result:
----------------
Prints out 3 dots and abort
Actual result:
--------------
Print out dots until page timeout
--
Edit bug report at http://bugs.php.net/?id=32688&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32688&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32688&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32688&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32688&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32688&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32688&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32688&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32688&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32688&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32688&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=32688&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=32688&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32688&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32688&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32688&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32688&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32688&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32688&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32688&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32688&r=mysqlcfg
Thread (5 messages)
- rene dot vogt at cnlab dot ch