#18803 [Fbk->Opn]: FTP function ftp_rawlist takes very long in some cases
| From: | dennisre at gmx dot de | Date: | Thu, 08 Aug 2002 22:22:09 +0000 |
| Subject: | #18803 [Fbk->Opn]: FTP function ftp_rawlist takes very long in some cases | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16332@lists.php.net to get a copy of this message | ||
ID: 18803
User updated by: dennisre@gmx.de
Reported By: dennisre@gmx.de
-Status: Feedback
+Status: Open
Bug Type: FTP related
Operating System: red hat 7.1
PHP Version: 4.2.2
New Comment:
I have tested it with an IIS 5.0 FTP Server and it seams to work.
Previous Comments:
------------------------------------------------------------------------
[2002-08-08 12:38:04] kalowsky@php.net
Again, neither test platform for me fails on this test.
Can you try something other than ProFTPd?
------------------------------------------------------------------------
[2002-08-08 12:13:45] dennisre@gmx.de
>You realize that your $list is never printed, correct?
Yes. The main problem is that it takes about 5 min to execute this
code. When you try to reproduce, it is important that:
1) $filename file is a existing file
2) $dest file does not exist
3) the FTP login succeeds
also the OS is red hat 7.1 with proftpd 1.2.2
------------------------------------------------------------------------
[2002-08-08 09:47:04] kalowsky@php.net
Unable to reproduce on OSX and FreeBSD 4.6.
You realize that your $list is never printed, correct?
------------------------------------------------------------------------
[2002-08-08 09:36:01] dennisre@gmx.de
My scripts contains this code. It should copy the $filename file to the
$dest file on the FTP server, and then get a raw list of files in the
current directory.
$filename = "";
$dest = "";
$server = "";
$user = "";
$password = "";
$ftp = @ftp_connect($server);
@ftp_login($ftp, $user, $password);
$tmpfile = tempnam("/tmp", "ftp");
@ftp_get($ftp, $tmpfile, $filename, FTP_BINARY);
@ftp_put($ftp, $dest, $tmpfile, FTP_BINARY);
@unlink($tmpfile);
$list = @ftp_rawlist($ftp, ".");
@ftp_close($ftp);
When this script is executed, it takes about 5 minutes and the
ftp_rawlist() function returns an empty list.
It should be completed in less then one second (FTP server was local
when I tested). Also the return rawlist should not be empty.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18803&edit=1