Re: PHP 4.0 Bug #7395 Updated: fread() is not bin-safe on Windows
| From: | Wieker Guido | Date: | Fri, 01 Dec 2000 12:49:58 +0000 |
| Subject: | Re: PHP 4.0 Bug #7395 Updated: fread() is not bin-safe on Windows | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-39781@lists.php.net to get a copy of this message | ||
Hi andi,
no I used fopen(<filename>, "r"). I'll try "rb" this afternoon.
All my Scripts which use "fread" or "fgetc" to read files are written for
PHP3 and worked just fine there on both Linux/Apache/PHP_DSO and
Win9x/PWS/PHP_CGI (.exe). Then I tried them with PHP4 under both OS and
with Linux all worked as espected but with Windows OS both fread and fgetc
shows the same misbehavior.
But I'll make a test with "rb" instead of "r" on fopen and report it to
you later. When does this feature first apeared in the manual, I'v never
seen it befor ;-)
THANKS for your tip so far.
By,
Guido
On 1 Dec 2000, Bug Database wrote:
> ID: 7395
> Updated by: andi
> Reported By: i088@informatik.fh-wuerzburg.de
> Status: Feedback
> Bug Type: Filesystem function related
> Assigned To:
> Comments:
>
> Did you use "rb" with fopen()?
>
> Previous Comments:
> ---------------------------------------------------------------------------
>
> [2000-10-22 18:39:23] i088@informatik.fh-wuerzburg.de
> If you read a (binary) file into a string with fread() the string does not contain the whole
> file. This appears in the Windows-version (PWS/isapi-PHP and also Apache/apache-PHP-module) but not
> in the Linux-version (Apache/apache-PHP-module DSO).
>
> ---------------------------------------------------------------------------
>
>
> Full Bug description available at: http://bugs.php.net/?id=7395
>
>