|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-08-08 06:29 UTC] rob at rem5 dot com
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 13:00:01 2025 UTC | 
Description: ------------ when trying to keep a stream open using stream_set_timeout it will not allow the connection to stay open. I tried setting it to 0.. as well as 9999999999999999999999999. However it will not stay open more than 30 seconds. Reproduce code: --------------- #!/usr/local/php5/bin/php -qn <?php $socket = stream_socket_server("tcp://0.0.0.0:8000", $errno, $errstr); stream_set_timeout($socket, 99999999999999999999999999999999999999); if (!$socket) { echo "$errstr ($errno)<br />\n"; } else { while ($conn = stream_socket_accept($socket)) { fwrite($conn, "Simple Echo Using stream_socket_server() in PHP"); $foo = fgets($conn); fwrite($conn, $foo); fclose($conn); } fclose($socket); } ?> Expected result: ---------------- stream_socket_server() should stay open and accepting connections. Actual result: -------------- craps out after 30 secs