#23011 [Opn->Fbk]: fpassthru changed?
| From: | sniper@php.net | Date: | Wed, 02 Apr 2003 17:01:36 +0000 |
| Subject: | #23011 [Opn->Fbk]: fpassthru changed? | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37010@lists.php.net to get a copy of this message | ||
ID: 23011
Updated by: sniper@php.net
Reported By: gts at uclink dot berkeley dot edu
-Status: Open
+Status: Feedback
Bug Type: Filesystem function related
Operating System: SunOS 5.7
PHP Version: 4.3.1
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2003-04-01 21:57:21] gts at uclink dot berkeley dot edu
Have been using the following code for downloads with PHP
4.2.2 and Apache/1.3.26. Fpassthru() did not return on an
aborted download (user selects cancel). Now with PHP 4.3.1
and Apache 2, aborted downloads return and give the OK
message:
$fp = @fopen( "$file", 'r' );
$rc = fpassthru($fp);
Log("($file) ($rc) Download OK.");
The value returned by fpassthru($fp) is always the full size
of the file even when the download is aborted (even on very
large files where there is no chance it could actually have
beem read, 250MB). When tested with ===, fpassthru($fp)
always returns FALSE. Same results with readfile().
What's happening here?
Greg Small
gts@uclink.berkeley.edu
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23011&edit=1