From:             php at lachoseinteractive dot net
Operating system: Linux & Mac OS X
PHP version:      5.0.3
PHP Bug Type:     FTP related
Bug description:  Data missing using DirectoryIterator with ftp:// wrapper 

Description:
------------
Reading a directory with a DirectoryIterator using an 
ftp wrapper doesn't work well.
Tested on 3 ftp servers. (proftp, ncftp, and ..unknown 
:-/). on 3 different machines and network.
With proftp and ncftp, some items are missing from the 
retrieved directory list. (whereas it works well with 
readdir()), even with a directory containing no more 
than 2 or 3 files. This doesn't seem to be related to 
the nature of the file, but rather to its position in 
the list : add a new file to the directory, and the 
previously missing file would show up, while another one 
is now missing.

On the third server (ftpperso.free.fr), the directory 
was correctly read.
In all cases, retrieving the list is very slow, and 
often fails.


Reproduce code:
---------------
example:

$dir = new DirectoryIterator("ftp://myftpserver.com/";);

foreach ( $dir as $f ) {
 if ( $f->isDot() ) continue;
 echo $f->getFilename()."\n";
}


-- 
Edit bug report at http://bugs.php.net/?id=31774&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31774&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31774&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31774&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31774&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31774&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31774&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31774&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31774&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31774&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31774&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31774&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31774&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31774&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31774&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31774&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31774&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31774&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31774&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31774&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31774&r=mysqlcfg

Reply via email to