php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34721 fpassthru() or readfile() returns invalid data
Submitted: 2005-10-03 22:04 UTC Modified: 2005-10-04 17:55 UTC
From: cpriest at warpmail dot net Assigned:
Status: Closed Package: Output Control
PHP Version: 5.0.5 OS: Redhat Enterprise 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: cpriest at warpmail dot net
New email:
PHP Version: OS:

 

 [2005-10-03 22:04 UTC] cpriest at warpmail dot net
Description:
------------
Calling fpassthru() or readfile() on a file returns a truncated file, using:

echo file_get_contents(); and it works fine.

I'm assuming its a binary issue, I know it has problems with pdf documents.

Reproduce code:
---------------
readfile($filepath); // Returns unreadable pdf file


Expected result:
----------------
Uncorrupted file returned to browser

Actual result:
--------------
Corrupted file returned to browser

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-04 17:55 UTC] cpriest at warpmail dot net
CVS Version fixed the problem, thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC