#34721 [Opn->Fbk]: fpassthru() or readfile() returns invalid data

From: Date: Mon, 03 Oct 2005 20:13:02 +0000
Subject: #34721 [Opn->Fbk]: fpassthru() or readfile() returns invalid data
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-85955@lists.php.net to get a copy of this message
ID: 34721 Updated by: tony2001@php.net Reported By: cpriest at warpmail dot net -Status: Open +Status: Feedback Bug Type: Output Control Operating System: Redhat Enterprise 4 PHP Version: 5.0.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-10-03 22:04:15] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34721&edit=1

« previous php.bugs (#85955) next »