|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37689 Read buffer out of sync with issued commands
Submitted: 2006-06-03 22:45 UTC Modified: 2006-06-13 01:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jasper dot e at gmail dot com Assigned:
Status: No Feedback Package: FTP related
PHP Version: 5.1.4 OS: Fedora Core 2
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.
Block user comment
Status: Assign to:
Bug Type:
From: jasper dot e at gmail dot com
New email:
PHP Version: OS:


 [2006-06-03 22:45 UTC] jasper dot e at gmail dot com
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()

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-05 07:46 UTC]
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.

 [2006-06-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jul 20 23:01:28 2024 UTC