php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33458 fpassthru and readfile chop large files
Submitted: 2005-06-24 04:12 UTC Modified: 2005-06-24 10:14 UTC
From: manuelva at uci dot cu Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5.0.4 OS: WindowsXP SP2
Private report: No CVE-ID: None
 [2005-06-24 04:12 UTC] manuelva at uci dot cu
Description:
------------
Both fpassthru and readfile chop large file.

Similar bugs are reported in PHP versions
5.0.1 (Closed, solved in a snapshot, bug #29801)
4.2.4-dev
4.1.1

But it seems it has been reintroduced now in 5.0.4.


Reproduce code:
---------------
// This file is 4mb large.
$file = "pdf-letter-2.4.1.tar.bz2";
header('Content-type: application/*');
header('Content-length: '.filesize($file));
readfile($file);

Expected result:
----------------
the whole file

Actual result:
--------------
about 1.9mb of the contents

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-24 10:14 UTC] tony2001@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #32553 (which was fixed 3 months ago).
That's why we ask to test *latest* snapshots before reporting any issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 03:01:29 2024 UTC