php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13214 Request: Tiny patch to allow fast recurisive ftp_rawlist
Submitted: 2001-09-08 15:38 UTC Modified: 2002-07-04 09:49 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gray at lowpass dot net Assigned:
Status: Closed Package: FTP related
PHP Version: 4.0.6 OS: Linux
Private report: No CVE-ID: None
 [2001-09-08 15:38 UTC] gray at lowpass dot net
I'm not really up to speed with making diffs and contributing myself, otherwise I would.

There are many posts in the manual showing various ways to get recursive directory listing with ftp_rawlist, but they're all very slow as they required chdir'ing into each subdirectory..

One tiny change to ext/ftp/ftp.c at line 420
        return ftp_genlist(ftp, "LIST", path);
changed to
        return ftp_genlist(ftp, "LIST -R", path);

And the FTP daemon at the other end will do all the work.

It would be nice to have a more eligant version of that incorperated into a future release.

Thanks.. 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-30 23:34 UTC] matslin at orakel dot ntnu dot no
I just stumbled across this feature request earlier today, and i have created a patch as a suggestion that adds a parameter to ftp_rawlist, a boolean that indicates wether recursive or 'normal' listing should be used. 

You can test the patch if you want to, no guarantees, works for me:

http://software.e-mats.org/patches/ftp-diff-2002-07-01
 [2002-07-04 09:49 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.

Applied that patch by matslin@orakel.ntnu.no (a bit modified version of it)

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC