From: WPinegar at healthtech dot net Operating system: Windows Server 2003 PHP version: 5.0.1 PHP Bug Type: Reproducible crash Bug description: Using readfile() to send large files causes PHP to hang
Description: ------------ Attempting to use readfile() to send large (over 250MB) binary objects causes PHP 5.0.1 to hang or the web server to send a 302 error. Reverting back to PHP 4.3.8 resolves the issue. Using fopen() and fpassthru() only makes the issue worse. We are using IIS 6 and the PHP ISAPI script engine. Reproduce code: --------------- header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Disposition: attachment; filename=".basename($filename).";"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($filename)); readfile("$filename"); exit(); Expected result: ---------------- PHP 5 has an issue with sending large binary files. This should be resolved. -- Edit bug report at http://bugs.php.net/?id=29801&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29801&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29801&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29801&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=29801&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29801&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29801&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29801&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29801&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29801&r=support Expected behavior: http://bugs.php.net/fix.php?id=29801&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29801&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29801&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29801&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29801&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29801&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29801&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29801&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29801&r=float