|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-06-05 07:46 UTC] tony2001@php.net
[2006-06-13 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
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.