From: mertcan at dpozitif dot com Operating system: Centos 5.0 PHP version: 5.2.5 PHP Bug Type: Streams related Bug description: feof() hangs on UDP stream
Description: ------------ Using feof on UDP hangs. It should give true or false, in my example it should give true but it hangs. I've tried many ways but it always hangs. Reproduce code: --------------- $msg = "ÿÿÿÿchallenge rcon"; $fp = fsockopen("udp://62.68.207.16",27015, $errno, $errstr); fputs($fp, $msg, strlen($msg)); $response = fgets($fp, 1024); $challenge = substr($response, 19, strlen($response) - 20); $msg = "ÿÿÿÿrcon ".$challenge." \"123456\" ".$komut.chr(0); fputs($fp, $msg, strlen($msg)); echo feof($fp) ? 'true':'false'; $response .= fgets($fp, 32); fclose ($fp); Expected result: ---------------- true Actual result: -------------- hangs -- Edit bug report at http://bugs.php.net/?id=43325&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=43325&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=43325&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=43325&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=43325&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=43325&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=43325&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=43325&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=43325&r=needscript Try newer version: http://bugs.php.net/fix.php?id=43325&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=43325&r=support Expected behavior: http://bugs.php.net/fix.php?id=43325&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=43325&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=43325&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=43325&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43325&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=43325&r=dst IIS Stability: http://bugs.php.net/fix.php?id=43325&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=43325&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=43325&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=43325&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=43325&r=mysqlcfg