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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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: Mon May 06 05:01:31 2024 UTC