PHP 4.0 Bug #6301 Updated: fread with UDP filepointer

From: Date: Thu, 21 Sep 2000 14:46:00 +0000
Subject: PHP 4.0 Bug #6301 Updated: fread with UDP filepointer
Groups: php.dev 
Request: Send a blank email to php-dev+get-33491@lists.php.net to get a copy of this message
ID: 6301 Updated by: sniper Reported By: Mr.Chaos@area99.dk Status: Closed Bug Type: *General Issues Assigned To: Comments: No feedback. Previous Comments: --------------------------------------------------------------------------- [2000-08-23 06:06:46] stas@php.net So it doesn't crash, just stops? Did you try non-blocking read (good idea with UDP anyway)? --------------------------------------------------------------------------- [2000-08-23 06:06:41] stas@php.net So it doesn't crash, just stops? Did you try non-blocking read (good idea with UDP anyway)? --------------------------------------------------------------------------- [2000-08-22 14:21:53] Mr.Chaos@area99.dk I´m making a gameserver report script. The problem is when i try to read the reply from the filepointer. <?php $charstoread=500; $fp = pfsockopen("udp://localhost", 27960, &$errno, &$errstr, 10); if(!$fp) { echo "$errstr ($errno)<br>n"; } else fputs($fp,"xffxffxffxffgetstatus"); echo fread($fp, $charstoread); fclose($fp); ?> Since i don´t know how many char´s i have to read I use fread, because it should stop when it reaches EOF, but it doesn´t stop. PHP3 freezes, or enter an infinite loop, maybee because it´s unable to find EOF ???. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6301

« previous php.dev (#33491) next »