Doc #72505 [Opn]: readfile() mangles files larger than 2G

From: Date: Mon, 27 Jun 2016 12:49:18 +0000
Subject: Doc #72505 [Opn]: readfile() mangles files larger than 2G
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13634@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72505&edit=1 ID: 72505 User updated by: mueller at relog dot ch Reported by: mueller at relog dot ch Summary: readfile() mangles files larger than 2G Status: Open Type: Documentation Problem Package: Filesystem function related Operating System: SuSE linux PHP Version: 7.0.8 Block user comment: N Private report: N New Comment: Email address is not well protected... Previous Comments: ------------------------------------------------------------------------ [2016-06-27 12:48:02] mueller at search dot ch Fixed Bug Type ------------------------------------------------------------------------ [2016-06-27 12:41:30] mueller at relog dot ch 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 this bug report at https://bugs.php.net/bug.php?id=72505&edit=1

« previous php.doc.bugs (#13634) next »