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
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.
Password:
Status:
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: Thu May 02 23:01:30 2024 UTC