Doc #72505 [NEW]: readfile() mangles files larger than 2G
| From: | mueller at search dot ch | Date: | Mon, 27 Jun 2016 12:41:32 +0000 |
| Subject: | Doc #72505 [NEW]: readfile() mangles files larger than 2G | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-13632@lists.php.net to get a copy of this message | ||
From: mueller at search dot ch
Operating system: SuSE linux
PHP version: 7.0.8
Package: Filesystem function related
Bug Type: Documentation Problem
Bug description:readfile() mangles files larger than 2G
Description:
------------
when readfile() is used to output a file larger than 2G, the output is
not identical with the input.
Test script:
---------------
# output mangled for files larger than 2G
bash:> dd if=largefile of=aa bs=1M count=2049 2>/dev/null; php -r
'readfile("aa");' >bb; crc32 aa bb
b5c09ad4 aa
2e905867 bb
Expected result:
----------------
same crc32 for aa and bb (which is the case if you use count=2047)
Actual result:
--------------
different crc32 for aa and bb
--
Edit bug report at https://bugs.php.net/bug.php?id=72505&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72505&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72505&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72505&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72505&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72505&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72505&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72505&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72505&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72505&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72505&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72505&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72505&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72505&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72505&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72505&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72505&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72505&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72505&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72505&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72505&r=mysqlcfg