ID: 37689
Updated by: [EMAIL PROTECTED]
Reported By: jasper dot e at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: FTP related
Operating System: Fedora Core 2
PHP Version: 5.1.4
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2006-06-03 22:45:36] jasper dot e at gmail dot com
Description:
------------
I have a piece of code crawling an ftp site, ftp_chdir()'ing and
ftp_get()'ing a lot of files troughout the ftp dirtree.
I have noticed, that after a failed ftp_get() the read buffer often
goes out of sync with the issued commands.
In other words; an ftp_chdir() command shows a warning with the result
message from a previous command.
Here's an example PHP warning:
<b>Warning</b>: ftp_chdir() [<a
href='function.ftp-chdir'>function.ftp-chdir</a>]: ABOR command
successful. in <b>/home/frozen/frozftp.class.php</b> on line
<b>93</b><br />
Reproduce code:
---------------
The code this error originates from has the following snippet in it,
which is called for each dir it's supposed to crawl:
if ($SFTP->cwd($dirname) === false) { $SFTP->abor(); return false; }
The cwd and abor functions from the SFTP class:
function cwd($path)
{
return (ftp_chdir($this->fd,$path)) ? true : false;
}
function abor()
{
ftp_raw($this->fd,"ABOR");
}
Expected result:
----------------
I would expect the ftp_chdir() function to return a true value
Actual result:
--------------
A warning message from the ftp_chdir() with the result from a previous
command in it.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37689&edit=1