ID:               33252
 Updated by:       [EMAIL PROTECTED]
 Reported By:      anil at saog dot net
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: linux FC2
 PHP Version:      4.3.10
 New Comment:

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




Previous Comments:
------------------------------------------------------------------------

[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://[EMAIL PROTECTED]/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://[EMAIL PROTECTED]:2122/bug.txt", "r");

or if you can't change the remote port;

$handle = fopen("ftp://[EMAIL PROTECTED]:21/bug.txt", "r");




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=33252&edit=1

Reply via email to