ID: 39458 Updated by: [EMAIL PROTECTED] Reported By: brain at eucoders dot com -Status: Assigned +Status: Closed Bug Type: FTP related Operating System: Rehat Linux PHP Version: 4.4.4 Assigned To: nlopess New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2006-12-01 16:12:37] [EMAIL PROTECTED] OK, forget my last comment. I found a server that exibists this behaviour (ftp.freeradius.org/pub/suse/i386). I'll work on a patch. ------------------------------------------------------------------------ [2006-12-01 16:02:10] [EMAIL PROTECTED] can you please provide a network dump (e.g. with ethereal) of the connections to the ftp server? (or can you provide the address of your ftp server) I can't reproduce your problem with a few servers I tried. ------------------------------------------------------------------------ [2006-12-01 06:53:30] mspreij at gmail dot com Seeing similar errors in PHP 5.1.6 on Ubuntu: - with (local) ftp server ProFTPD, ftp_nlist() returns false for both empty and non-existing directories. ftp_rawlist() behaves properly. - with external ftp server vsFTPd 2.0.1 (on RedHat), it returns proper empty array, but then that /also/ returns empty arrays for non-existing paths, should be boolean false? ftp_rawlist() does the same strange thing here: empty arrays for both empty and non-existing directories. ------------------------------------------------------------------------ [2006-11-10 16:18:31] brain at eucoders dot com It appears that this problem appears on php 4.4.4 and also 4.3.2 version. Other versions should contain the same problem. ------------------------------------------------------------------------ [2006-11-10 14:20:22] brain at eucoders dot com The problem is that the developer cannot use this ftp_rawlist in case the directory do not exist. In that case, ftp_nlist will return false (unreliable result) and ftp_rawlist return Array() which is again unreliable. The best fix would be that ftp_nlist return false when the directory does not exist, and Array() when directory is empty. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39458 -- Edit this bug report at http://bugs.php.net/?id=39458&edit=1