|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9468 fread stops reading
Submitted: 2001-02-26 14:40 UTC Modified: 2001-02-27 08:29 UTC
From: stock at cargo-partner dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 4.0.4 OS: w2k
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: stock at cargo-partner dot com
New email:
PHP Version: OS:


 [2001-02-26 14:40 UTC] stock at cargo-partner dot com
i am using php 4.0.4 (build 20.12.2000) on w2k (build 2195)with iis5.
pls. note that fread function has a problem reading a binary file (*.zip) afer uploading.
fread stops after reading 389 bytes instead of reading the whole file using following code:

$filesize=filesize($path . "/" . $attachment_name);
$filenum=fopen($path . "/" . $attachment_name,"r");

pls. help


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-27 08:29 UTC]
$filenum=fopen($path . "/" . $attachment_name,"rb");

Read the manual page:

Where it says:
"The mode may contain the letter 'b'. This is useful only on systems which differentiate between binary and text files (i.e., it's useless on Unix)."


PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Oct 07 07:05:53 2022 UTC