PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe.

From: Date: Mon, 30 Oct 2000 15:50:47 +0000
Subject: PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe.
Groups: php.dev 
Request: Send a blank email to php-dev+get-36414@lists.php.net to get a copy of this message
ID: 3601 Updated by: stas Reported By: iredden@redden.on.ca Status: Open Bug Type: *General Issues Assigned To: Comments: I don't get it. How fgets is supposed to be binary-safe??? It's oriented on \n for end-of-input, so it cannot accept arbitrary input anyway. Why not use fread/fwrite? Please reopen if there are some other issues except not using fread instead of fgets, such as fread that doesn't work with UDP (which works for me). Previous Comments: --------------------------------------------------------------------------- [2000-10-12 08:05:44] sniper@php.net User feedback: -------------- http://php4bug.directoryinfo.net/udp.phps -------------- Only changes to that first example script are: $maxlen = 2048; $default_host = "216.250.231.24"; --Jani --------------------------------------------------------------------------- [2000-10-02 22:09:29] sniper@php.net Reopened. fgets() supports UDP but isn't binary safe. To Ian: Could you provide a working example case? That url didn't work.. --Jani --------------------------------------------------------------------------- [2000-10-02 22:09:07] sniper@php.net Reopened. fgets() supports UDP but isn't binary safe. To Ian: Could you provide a working example case? That url didn't work.. --Jani --------------------------------------------------------------------------- [2000-10-02 19:05:00] sniper@php.net No feedback. --------------------------------------------------------------------------- [2000-09-04 19:46:02] sniper@php.net Just tested that example script and it worked..but that url given doesn't exist so I couldn't test it further. Stas: I believe UDP-support exists now? At least manual says so..=) --Jani --------------------------------------------------------------------------- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=3601

« previous php.dev (#36414) next »