php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24937 Serv-U 4.1 & FTP ftp_nlist() , ftp_rawlist()
Submitted: 2003-08-04 13:24 UTC Modified: 2003-08-04 13:53 UTC
From: sadun at isikun dot org Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.3.3RC2 OS: windows server 2003
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: sadun at isikun dot org
New email:
PHP Version: OS:

 

 [2003-08-04 13:24 UTC] sadun at isikun dot org
Description:
------------
when i use these functions on v-ftp (unix) OR "IIS6.0 FTP server" there are no problems but when i started use "Serv-U 4.1" (which is commonly used at virtual hosting companies) fallowing error started to accour.

** this server let you to create virtual directory accounts.

user se u:\home\user_name as / root folder.



Reproduce code:
---------------
<?php
$conn = ftp_connect("webgroup.isikun.edu.tr");
ftp_login($conn, "webgroup_ftp", "wmgwebisik");
$nlist = ftp_nlist($conn, "");
$rawlist = ftp_rawlist($conn, "");

echo "<pre>";
print_r($nlist); /*simple array of directories & files*/
print_r($rawlist); /*complete array of directories & files*/
echo "</pre>";
?>

Expected result:
----------------
Array
(
    [0] => php
    [1] => php.4.3.3rc2
    [2] => php4.3.2
    [3] => temp
    [4] => wwwroot
)
Array
(
    [0] => drw-rw-rw-   1 user     group           0 Aug  4 17:08 php
    [1] => drw-rw-rw-   1 user     group           0 Aug  4 16:46 php.4.3.3rc2
    [2] => drw-rw-rw-   1 user     group           0 Jul 31 16:19 php4.3.2
    [3] => drw-rw-rw-   1 user     group           0 Aug  4 16:56 temp
    [4] => drw-rw-rw-   1 user     group           0 Aug  4 21:09 wwwroot
)



Actual result:
--------------
Array
(
    [0] => tr8  /*no such directory */
)
Array
(
    [0] => drw-rw-rw-   1 user     group           0 Aug  4 17:08 php
    [1] => drw-rw-rw-   1 user     group           0 Aug  4 16:46 php.4.3.3rc2
    [2] => drw-rw-rw-   1 user     group           0 Jul 31 16:19 php4.3.2
    [3] => drw-rw-rw-   1 user     group           0 Aug  4 16:56 temp
    [4] => -rw-rw-rw-   1 user     group           0 Aug  4 21:09 tr8.1
    [5] => drw-rw-rw-   1 user     group           0 Aug  4 19:55 wwwroot
)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-04 13:53 UTC] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

 ftp_nlist() will only return the files inside a particular directory. While  ftp_rawlist() will list both files & directories. Since other then tr8.1 there are no files in the specified directory output of ftp_nlist() only contains a single element.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC