PHP 4.0 Bug #7395 Updated: fread() is not bin-safe on Windows
| From: | waldschrott@php.net | Date: | Mon, 04 Dec 2000 17:43:57 +0000 |
| Subject: | PHP 4.0 Bug #7395 Updated: fread() is not bin-safe on Windows | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40011@lists.php.net to get a copy of this message | ||
ID: 7395
Updated by: waldschrott
Reported By: i088@informatik.fh-wuerzburg.de
Status: Bogus
Bug Type: Filesystem function related
Assigned To:
Comments:
bogus then
Previous Comments:
---------------------------------------------------------------------------
[2000-12-04 12:39:13] i088@informatik.fh-wuerzburg.de
I'm very sorry:
fread IS bin-safe also on Windows OS, you only have to open the file with fopen(<filename>,
"rb") instead of fopen(<filename>, "r"). In PHP3 this don't make a
difference but with PHP4 there is this big difference on Windows OS.
---------------------------------------------------------------------------
[2000-12-01 04:37:18] andi@php.net
Did you use "rb" with fopen()?
---------------------------------------------------------------------------
[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