php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16254 ftp_rawlist limit at 997 entries for large directories
Submitted: 2002-03-25 05:31 UTC Modified: 2002-03-25 08:17 UTC
From: rrouanet at dialoca dot com Assigned:
Status: Closed Package: FTP related
PHP Version: 4.0.6-7 OS: Linux 2.2.16-22smp
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rrouanet at dialoca dot com
New email:
PHP Version: OS:

 

 [2002-03-25 05:31 UTC] rrouanet at dialoca dot com
ftp_rawlist return a list of 997 files when executed on a directory containing more than 2000 files (More than 997 files should be enough to reproduce the bug), IF the directory argument specifies a type of files to list like *.wav

Here is a sample script to reproduce this:

<?
/*******************************************************/
$conn_id = ftp_connect( "ftpserver" );
$login_result = @ftp_login($conn_id, "user", "password");
$dir = "/test/*.wav";
$list = ftp_rawlist($conn_id, $dir);

if ($login_result) {
  $length = count( $list );
  echo "${length} files in the directory ${dir}<br><br>";
	
  for( $i = 0; $i < $length; $i++ ) {
    echo "${list[ ${i} ]}<br>";
  }

  ftp_quit($conn_id);
}
/********************************************************/
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-25 05:38 UTC] rrouanet at dialoca dot com
Exact version of PHP I use
 [2002-03-25 07:57 UTC] derick@php.net
The code has no such limitation... might be your FTP server.
Can you try other FTP servers?

Derick
 [2002-03-25 08:17 UTC] rrouanet at dialoca dot com
You're right Derick, the problem came from my FTP server. Sorry for this. Thanks.

Regis
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC