From:             [EMAIL PROTECTED]
Operating system: RedHat 7.1
PHP version:      4.0.6
PHP Bug Type:     FTP related
Bug description:  Can't list directories in symlink using ftp_nlist and ftp_rawlist

hihi all,

I'm using RedHat 7.1, kernel 2.9.6 with apache 1.3.19, php4.0.6 and
wu-ftpd-2.6.1-18. I did using ftp_nlist and ftp_rawlist to list a symlink
directories in my programme. For ftp_nlist, it can only list the files in
the directorise. For ftp_rawlist, it only shows the direcctories itself
(not . but the name of itself). I tested with the following simple script
and the problem still exists.

<?php
$conn = ftp_connect("localhost");
if (!conn) exit();
if (!ftp_login($conn, 'mylogin', 'password')) exit();
ftp_pasv($conn, TRUE);
$ls = ftp_nlist($conn, 'public');
$rls = ftp_rawlist($conn, 'public');
var_dump($ls);
var_dump($rls);
?>

The result of my programme is that: for $ls, it shows all files execpt
directories; for $rls it shows only the directories with it's
information.

For the normally directories and the symlink files, it is OK!!

In my original programme, however, even thorugh I can't see any
directories, I can still mkdir and it return success. However, I can't see
the new directory. I'd also tried this test programme in FreeBSD4.4 and
php4.0.6, connecting to the same FTP server, getting the same result.

Here is some additional information for your reference:

make a link:
ln -s ./public_html ./public

test programme result (2 directories missed) :

array(5) { [0]=> string(18) "public/db_test.php" [1]=> string(15)
"public/ftp2.php" [2]=> string(18) "public/ftptest.php" [3]=> string(14)
"public/md5.exe" [4]=> string(15) "public/test.php" }
array(1) { [0]=> string(76) "lrwxrwxrwx 1 root root 11 Nov 26 11:01 public
-> public_html" }
-- 
Edit bug report at: http://bugs.php.net/?id=14247&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to