ftp_nlist, ftp_rawlist doesn't work. (ftp_connect, ftp_login DOES work!)
| From: | BoonHead | Date: | Tue, 25 Sep 2001 11:47:20 +0000 |
| Subject: | ftp_nlist, ftp_rawlist doesn't work. (ftp_connect, ftp_login DOES work!) | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-9510@lists.php.net to get a copy of this message | ||
I havn't installed any module of any kind after the installation of the
latest versions Apache (1.3.20) and PHP (4.0.6).
I searched the whole newsgroup for ftp problems.
Mine wasn't there...
My script DOES execute the ftp_connect command. (so ftp must be buildin,
load and/or enabled)
The ftp_login command also works.
My problem: I can't list a directory. Not even root /! With ftp_nlist nor
ftp_rawlist
The ftp is fully open!!!
This is my script
<?
// ----------------------------------------------------[ Start connection
$ftpFolder = ftp_connect("192.168.168.2");
if ($ftpFolder == false)
{
echo "Error: No connection.";
}
// ----------------------------------------------------[ Login
$intLogin = ftp_login($ftpFolder, "Anonymous", "bla@bla.com");
if ($intLogin == false)
{
echo "Error: Wrong login.";
}
// ----------------------------------------------------[ Mid
ftp_pasv($ftpFolder, true);
echo ftp_systype($ftpFolder) . " " . ftp_pwd($ftpFolder) . "<br>\n";
$arystrFolder = ftp_nlist($ftpFolder, ftp_pwd($ftpFolder));
echo $arystrFolder;
if ($arystrFolder == false)
{
echo "Error: No folder.";
}
else
{
if (Is_Array($arystrFolder) == false)
{
echo $arystrFolder;
}
else
{
foreach ($arystrFolder as $strItem)
{
echo $strItem;
}
}
}
// ----------------------------------------------------[ End connection
ftp_quit($ftpFolder);
?>
And this is the out put:
UNIX-V /
Error: No folder.
If anyone can shed some light on it...thanx...
BoonHead, The Lost Philosopher...
_______________________________________________________________________
|
| Hackers made you computers to make your work easy.
| Hackers build the internet so you can have almost every information at
your fingertips.
| Hackers make you a firewall to keep you safe.
|
| We love what we do!
|
| You say we destroy.
| You say we're evil.
| You call us crackers.
| And you think you are so much better then us.
|
| You love what you do!
_______________________________________________________________________
// ###################################
// ## website: www.boonhead.f2s.com
// ## email: boonhead@wish.net
// ## icq: #53380888
// ## msn: boonheadtlp
// ###################################
(Stop cracking, start hacking...Greensneeze?)