php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10977 ftp_nlist() doesn't list directories
Submitted: 2001-05-20 16:26 UTC Modified: 2001-05-20 19:18 UTC
From: fredrik at devibe dot net Assigned:
Status: Closed Package: FTP related
PHP Version: 4.0.4pl1 OS: RedHat Linux 7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fredrik at devibe dot net
New email:
PHP Version: OS:

 

 [2001-05-20 16:26 UTC] fredrik at devibe dot net
ftp_nlist() only returns the file names when used with wu-ftp 2.6.1, not directories. When used with wu-ftp 2.5.0 it does, so I guess this could also be a problem with wu-ftp. I've tried this with an earlier PHP version as well, but the result remained the same. The fix was to install wu-ftp 2.5.0, but that's an old version and as I've heard it's not very secure, it'd be nice to have this fixed.


--Fredrik

Btw: My configure line for php was:
'./configure --prefix=/usr --with-config-file-path=/etc --disable-debug --enable-pic --enable-shared --enable-inline-optimization --with-apxs=/usr/sbin/apxs --with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd --with-jpeg-dir=/usr --with-png --with-zlib --with-db2 --with-db3 --with-gdbm --enable-debugger --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-yp --enable-ftp --enable-wddx --without-mysql --without-oracle --without-oci8 --with-xml'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-20 19:18 UTC] sniper@php.net
From the FTP rfc:

"NAME LIST (NLST)

This command causes a directory listing to be sent from
server to user site.  The pathname should specify a
directory or other system-specific file group descriptor; a
null argument implies the current directory.  The server
will return a stream of names of files and no other
information.  The data will be transferred in ASCII or
.."

So it's a bug in wu-ftpd 2.5.0 that causes it to send 
also the dir names.

Use ftp_rawlist() instead.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC