ID: 32058 Updated by: [EMAIL PROTECTED] Reported By: alan at ridersite dot org -Status: Feedback +Status: No Feedback Bug Type: Sockets related Operating System: BSD PHP Version: 4.3.10 New Comment:
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. Previous Comments: ------------------------------------------------------------------------ [2005-02-22 08:31:52] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2005-02-21 23:14:57] alan at ridersite dot org Description: ------------ It appears to me that stream_set_timout() does not do anything of value. You can set it prior to a while loop; but, it does nothing to help you exit the loop if the time expires. e.g., stream_set_timeout($fp, 20); $status = socket_get_status($fp); while (!feof($fp) && !$status['timed_out']) { $chunk = fread($fp, 10000); $length = strlen($chunk); $html_str .= $chunk; sleep(2); $status = socket_get_status($fp); } //end while, fetching data If fread() hangs up, the script hangs. You can do exactly the same thing by simply keeping track of elapsed time in the loop. Set stream_set_blocking($fp, FALSE ) so fread() keeps going and the loop continues until the elapsed time expires. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32058&edit=1