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
 [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: Tue Apr 23 22:01:31 2024 UTC