|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-29 21:23 UTC] norxh at binnews dot com
[2004-07-31 13:56 UTC] wez@php.net
[2004-07-31 22:45 UTC] norxh at binnews dot com
[2004-07-31 22:47 UTC] norxh at binnews dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ When feof is called on an empty tcp stream opened by fsockopen, php will hang indefinitely. In adition to 5.0.0, I also tested with 5.0.x-dev (Jul 29, 2004 16:30 GMT) and 5.1.x-dev (Jul 29, 2004 14:30 GMT). Each test was run with the cli executable. When attempting to debug this issue with Zend Studio 3.5, I found stopping execution during this hang will cause php.exe or apache.exe to crash when using local or remote debugging respectively. Adding: fwrite($stream, "GET / HTTP1.0\r\n\r\n"); before the call to feof will result in proper execution of the script. Reproduce code: --------------- <? set_time_limit(15); $stream = fsockopen('www.google.com', 80, $errno, $errstr, 5); stream_set_timeout($stream, 5); echo feof($stream) ? 'true':'false'; fclose($stream); ?> Expected result: ---------------- false Actual result: -------------- hang