From: jexli at vip dot 163 dot com Operating system: windows xp PHP version: 5.0.0b3 (beta3) PHP Bug Type: FTP related Bug description: Mr Li
Description: ------------ I use readfile() function to force download ftp file.In PHP4.3.4 version,the file size display unknow.But in PHP 5.0 the it works correctly.But they are also occur error when the FTP file size is large to 40M~50M. Reproduce code: --------------- <?php $filename = $_COOKIE["url"];//ftp request header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 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: ---------------- USE IN FORCE DOWNLOAD FTP FILE PHP 4.0 :If file size > 40M~50M,connection auto reset and download dialog closed. PHP 5.0 :If file size > 40M~50M,server cant response the request,download stoped,but download dialog still open,only not any response. But if file size <40M~50M,they are works fine. -- Edit bug report at http://bugs.php.net/?id=27220&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27220&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27220&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27220&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27220&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27220&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27220&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27220&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27220&r=support Expected behavior: http://bugs.php.net/fix.php?id=27220&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27220&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27220&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27220&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27220&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27220&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27220&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27220&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27220&r=float