RE: PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe.
| From: | Ian Redden | Date: | Tue, 05 Sep 2000 00:27:18 +0000 |
| Subject: | RE: PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-32007@lists.php.net to get a copy of this message | ||
ya it exists!!
But not binary safe. :) It seems to strip all the binary characters.
-----Original Message-----
From: Bug Database [mailto:php-dev@lists.php.net]
Sent: Monday, September 04, 2000 7:46 PM
To: iredden@redden.on.ca
Subject: PHP 4.0 Bug #3601 Updated: fgets is NOT binary safe.
ID: 3601
Updated by: sniper
Reported By: iredden@redden.on.ca
Status: Feedback
Bug Type: Other
Assigned To:
Comments:
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
Previous Comments:
[2000-03-03 14:47:51] sas@cvs.php.net
Suspending this until UDP support exists.
---------------------------------------------------------------------------
[2000-02-23 23:10:39] iredden@redden.on.ca
I am using a UDP socket routine. fgets does not seem to be binary safe and
you cant seem to use fread or fwrite which are two commands which are binary
safe.
<?php
$maxlen = 1024;
$default_host = "128.143.204.90";
$default_port = "28001";
$connection = fsockopen("udp://".$default_host, $default_port, &$errno,
&$errstr, 5);
if(!$connection) {
echo "$errstr ($errno)<br>n";
} else {
$msgsend = "bah";
fputs($connection, $msgsend);
$msgrecv = fgets($connection, $maxlen);
}
echo $msgrecv;
fclose($connection);
?>
goto http://www.clanhosting.net/packet.doc for
the packet query and response
packet formats to test my demo. I have played with this for hours and it
just doesnt seem to be binary safe. Am I doing something wrong???
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=3601