ID: 27220
Updated by: [EMAIL PROTECTED]
Reported By: jexli at vip dot 163 dot com
-Status: Open
+Status: Feedback
Bug Type: FTP related
Operating System: windows xp
PHP Version: 5.0.0b3 (beta3)
New Comment:
Can you please give the feedback I requested first?
And also this 'other' problem (propably related to this),
you NEED TO COME UP WITH EXAMPLE SCRIPT!!!! We can NOT read people's
minds..unfortunately. (I simply don't understand what you're writing,
code is usually self-explaining..)
Previous Comments:
------------------------------------------------------------------------
[2004-02-13 05:03:17] jexli at vip dot 163 dot com
Find a very serious problem about readfile().
I use the readfile function to output ftp file(300M) from Ftp Server
to my disk,But only one user can download it.other's can't.Not only
this,It expend a great deal of server's memory.
Secont question is ftp_get function can only get file to server,can it
get for end user's browser?
------------------------------------------------------------------------
[2004-02-11 10:58:39] [EMAIL PROTECTED]
Please give proper example script which can be just copy'n'pasted. (and
this works just fine for me on linux..tested using 500M file)
------------------------------------------------------------------------
[2004-02-11 09:26:26] jexli at vip dot 163 dot com
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 this bug report at http://bugs.php.net/?id=27220&edit=1