ID:               34091
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gordon at perridot dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: Linux 7.3
 PHP Version:      4CVS-2005-08-12 (stable)
 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-08-12 06:16:46] gordon at perridot dot com

Description:
------------
Hi,
  I am using php4.1, when i try connect to the FTP server via
fsockopen, after login succeesfully, i can't list or get files from the
server, the system prompt me 425 Can't open data connection.  How to
solve this problem?

Thank you...

Reproduce code:
---------------
$fp = fsockopen("ftpip",21);
fputs($fp,"USER myname\r\n");
echo fgets($fp,4096);

fputs($fp,"PASS mypassword\r\n");
echo fgets($fp,4096);

fputs($fp,"TYPE A\r\n");
echo fgets($fp,4096);

fputs($fp,"PASV\r\n");
echo fgets($fp,4096);

fputs($fp,"RETR test.txt\r\n");
echo fgets($fp,4096);

fputs($fp,"quit\r\n");

Expected result:
----------------
425 Can't open data connection. 



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


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

Reply via email to