[PHP-DEV] RE: PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe. From: Ian Redden (iredden <email protected>)
Date: 10/30/00

You cannot use fread or fwrite and yes I know they are binary safe.

http://php4bug.directoryinfo.net/udp.php I changed the example to use fread
and fwrite and you'll see it just hangs. :(

http://php4bug.directoryinfo.net/udp.phps
-----Original Message-----
From: Bug Database [mailto:php-dev <email protected>]
Sent: Monday, October 30, 2000 10:51 AM
To: iredden <email protected>
Subject: PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe.

ID: 3601
Updated by: stas
Reported By: iredden <email protected>
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 <email protected>
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 <email protected>
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 <email protected>
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 <email protected>
No feedback.

---------------------------------------------------------------------------

[2000-09-04 19:46:02] sniper <email protected>
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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>