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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 18:01:32 2025 UTC