#33252 [Com]: failed to open stream: FTP server reports 220
| From: | l33_adrian at yahoo dot com | Date: | Mon, 30 Oct 2006 02:41:17 +0000 |
| Subject: | #33252 [Com]: failed to open stream: FTP server reports 220 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104152@lists.php.net to get a copy of this message | ||
ID: 33252
Comment by: l33_adrian at yahoo dot com
Reported By: anil at saog dot net
Status: No Feedback
Bug Type: FTP related
Operating System: linux FC2
PHP Version: 4.3.10
New Comment:
i experience the same error "failed to open stream: Address family not
supported by protocol" im trying to open a url file thru http:// (sorry
if i psted this on a wrong section)
Previous Comments:
------------------------------------------------------------------------
[2005-10-05 12:23:39] fcartegnie at nordnet dot fr
I got the same problem, on a server.(passive supported)
"failed to open stream: FTP server reports 220 Serv-U FTP Server v6.0
for WinSock ready..."
At this point, 'result' variable worth '220'
ftp_fopen_wrapper.c
changing line 181
if (result > 299 || result < 200) {
to
if ((result > 299) || (result < 200)) {
changes the error in
"failed to open stream: Address family not supported by protocol"
------------------------------------------------------------------------
[2005-06-14 01:00:03] 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".
------------------------------------------------------------------------
[2005-06-06 10:22:24] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2005-06-06 01:52:38] anil at saog dot net
Description:
------------
using fopen function for ftp connections on default port (21) without
declaring port in function, brings an strange error;
Reproduce code:
---------------
$handle = fopen("ftp://..@62.75.202.32/bug.txt", "r");
$oldContent = fread($handle,5000000);
fclose($handle1);
Expected result:
----------------
as you see port is default (21) and not declared in function, this code
gives error;
"failed to open stream: FTP server reports 220"
as you know 220 means connection accepted, and it is not an error. But
if you change the remote port (for example 2122) and/or declare it in
function, there will be no problem;
$handle = fopen("ftp://..@62.75.202.32:2122/bug.txt",
"r");
or if you can't change the remote port;
$handle = fopen("ftp://..@62.75.202.32:21/bug.txt",
"r");
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33252&edit=1