|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: fbeyer at clickhand dot de
New email:
PHP Version: OS:


 [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-2023 The PHP Group
All rights reserved.
Last updated: Fri Jan 27 15:03:46 2023 UTC