php.net |  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
1 + 34 = ?
Subscribe to this entry?

 
 [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
    otherdir

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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-16 06:51 UTC] sesser@php.net
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] kalowsky@php.net
Dup of 16057
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 10:01:26 2024 UTC