|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18937 Still exists: ftp_rawlist() returns empty array for dirs containing spaces
Submitted: 2002-08-16 06:34 UTC Modified: 2002-08-16 09:48 UTC
From: fbeyer at clickhand dot de Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.2.2 OS: Windows XP
Private report: No CVE-ID: None
 [2002-08-16 06:34 UTC] fbeyer at clickhand dot de
This bug was already reported and closed, but the problem is not solved yet.

I am using the Windows binary of PHP 4.2.2 as an apache module with Windows XP Professional and Apache 1.3.20.

If a directory in a FTP server contains spaces, ftp_rawlist() returns an empty array. ftp_nlist() works as expected.

I had a directory structure similar to this one:

  my dir

I tried this:

ftp_rawlist($stream, '/my dir');

and it returnes an empty array (count() = 0).

ftp_nlist($stream, '/my dir');

returned an Array containing '.', '..' and 'otherdir' - exactly as expected.

I used the workaround to first use ftp_chdir():

ftp_chdir($stream, '/my dir');
ftp_rawlist($stream, '.');
ftp_chdir($stream, '/');

That worked.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-16 06:51 UTC]
Your bug report is a) duplicate and b) bogus.
Next time read the other bug reports.
This bug is fixed in CVS! You need the latest
snapshot. This bug is not fixed in the 
Security Release 4.2.2.

 [2002-08-16 09:48 UTC]
Dup of 16057
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 23:05:52 2022 UTC