Bug #17885 Updated: corrupted file downloads with fpassthru/fread/readfile

From: Date: Wed, 03 Jul 2002 12:15:52 +0000
Subject: Bug #17885 Updated: corrupted file downloads with fpassthru/fread/readfile
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12971@lists.php.net to get a copy of this message
ID: 17885 Updated by: loe@loe.at Reported By: dariusz@bulgaria.com Status: Open Bug Type: Apache2 related Operating System: WinXP Pro PHP Version: 4.2.1 New Comment: It is not os related. I have the same problem running apache 2.0.39 on linux (just the file sizes vary...) Windows XP Apache 2.0.39 PHP 4.2.1 approx. 40k Linux/ --"-- ~200k Previous Comments: ------------------------------------------------------------------------ [2002-06-27 06:55:16] dariusz@bulgaria.com I've been able to narrow the problem a little: A friend of mine tried the picture scripts on his machine (Win98SE, Apache2.0.36, PHP4.2.1 module, no virtual hosts) and it worked. My first thought was that the VHosts are the problem. So I installed Apache2 and PHP4.2.1 on my local machine (WinXP Pro, Apache2.0.36, PHP4.2.1 module) WITHOUT virtual hosts. The problem is still there - so the VHosts seem NOT to be the problem. I guess this has to be a WinXP Pro related problem then... ------------------------------------------------------------------------ [2002-06-27 06:22:32] dariusz@bulgaria.com Update: when using IMG SRC="somepic.php" where somepic.php only contains a content-type header and passes a picture file with fpassthru it doesn't work with Apache2, but it does work fine with Apache1. Apache2 sometimes shows the picture partially, sometimes not at all. Updated my test page on http://test.dariusz.info with this one. ------------------------------------------------------------------------ [2002-06-21 06:51:20] dariusz@bulgaria.com Built a little test page if someone's interested: http://test.dariusz.info/ ------------------------------------------------------------------------ [2002-06-21 05:44:03] dariusz@bulgaria.com Tried it with fopen($f,"rb")/fread, with fopen($f,"rb")/fpassthru and with readfile($f). Doesn't work with all three methods. ------------------------------------------------------------------------ [2002-06-21 05:06:53] hholzgra@php.net does it work with $fp = fopen($f, "rb"); fpassthru($fp); // no fclose() needed or just readfile($f); // might not be binary safe ? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17885 -- Edit this bug report at http://bugs.php.net/?id=17885&edit=1

« previous php.bugs (#12971) next »