Bug #14052 Updated: ftp_rawlist: Hangs up
| From: | kofaldt at basic-vision dot com | Date: | Wed, 23 Jan 2002 02:23:47 +0000 |
| Subject: | Bug #14052 Updated: ftp_rawlist: Hangs up | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-77852@lists.php.net to get a copy of this message | ||
ID: 14052
Comment by: kofaldt@basic-vision.com
Old Reported By: msjackson@bluemail.ch
Reported By: kofaldt@basic-vision.com
Status: Open
Bug Type: FTP related
Operating System: Win2K
PHP Version: 4.1.1
New Comment:
I had the same problem with linux and PHP 4.1.1.
In my opinion there's a problem in line 886 of file ext/ftp/ftp.c. I
replaced
memmove(ftp->inbuf, ftp->inbuf+4, FTP_BUFSIZE-4);
with
memmove(ftp->inbuf, ftp->inbuf+4, FTP_BUFSIZE-4);
if (ftp->extra)
ftp->extra -= 4;
The execution of memmove drops 4 bytes of the last response text which
is stored in ftp->inbuf. In case of ftp->extra != NULL, there are extra
characters and 4 characters of the next response are lost if you don't
adjust ftp->extra.
Previous Comments:
------------------------------------------------------------------------
[2002-01-20 19:35:33] erik@1000mbit.nl
Having the same problem here with WinXP proffesional
version 4.1.1
from my experience it seems it sends the "list" command.
then my FTP server (UNIX: type L8) receives it properly and
answers with the data being send in ASCii mode. and
then it hangs and i actually have to reboot for it to work
another time. It just won't interprete the script anymore
for a second there it allmost seems as if it needs to flush or waits
for a timeout to occur.
------------------------------------------------------------------------
[2002-01-09 11:32:45] yohgaki@php.net
Please update version :)
------------------------------------------------------------------------
[2002-01-09 11:31:38] mfischer@php.net
I'm setting this to open, version to 4.1.1. Although in CVS there
exists now a way to adjust the timeout (ftp_set_option(FTP_TIMEOUT_SEC,
10); for example) it's not a solution and there are still some flaws in
the implementation IMO.
------------------------------------------------------------------------
[2002-01-09 11:06:06] msjackson@bluemail.ch
Yes I've tested it with 4.1.1 and the problem ist still present. 90
Seconds is absolutly true! In this time he hangs in the ftp_rawlist
function... and then he will continue, but often doesn't work the next
call to ftp_rawlist too. And sorry, it isn't a problem of the user, but
when executing per CLI, the script run more reliable than executed by
apache. When I start the script directly it run sometimes until end
(Not often).
I tested it on 2 machines (W2K-Notebook and W2K-PC).
I'm very intrested in this function, because i'm working on a little
web-filesharing-tool, which should index content of ftps. Thanks for
your feedback!
------------------------------------------------------------------------
[2002-01-02 09:46:20] mfischer@php.net
Is this bug still present to you, also with 4.1.0?
If so, can you verify that the 'hang' time is about 90 seconds (its a
fixed coded timeout value in ext/ftp)?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=14052
Edit this bug report at http://bugs.php.net/?id=14052&edit=1