php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34164 Cannot view the directory list by using ftp_rawlist function
Submitted: 2005-08-17 07:30 UTC Modified: 2005-08-20 17:35 UTC
From: thomas188 at hotmail dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.4.0 OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thomas188 at hotmail dot com
New email:
PHP Version: OS:

 

 [2005-08-17 07:30 UTC] thomas188 at hotmail dot com
Description:
------------
When I use the ftp_rawlist, the output is empty when the path contains "[". For example, "/tmp/[test]". But others is OK. Please help !

Reproduce code:
---------------
// set up basic connection
$conn_id = ftp_connect("x.x.x.x");

// login with username and password
$login_result = ftp_login($conn_id, "username", "password");
	
// get contents of the current directory
$contents = ftp_rawlist($conn_id, "/tmp/[test]");

//output
var_dump($contents);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-17 10:44 UTC] tony2001@php.net
Obviously your ftp-server fails when this character appear in the path.
Try using any ftp client and you'll see the same.
Not PHP problem.
 [2005-08-20 17:35 UTC] thomas188 at hotmail dot com
But there is no problem when I change to use ftp_nlist function instead of. And it is success to get into the path "/tmp/[test]" from other FTP server, for example, "WS_FTP". so I believe that my server is OK for FTP browsing with "[" character inside.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC