ID: 32354 Updated by: [EMAIL PROTECTED] Reported By: amit2001_shah at yahoo dot com -Status: Open +Status: Feedback Bug Type: FTP related Operating System: Linux PHP Version: 4.3.8 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-03-17 14:57:54] amit2001_shah at yahoo dot com Description: ------------ I am trying to connect one server with mine through ftp. Connection is working nice. but when im trying to download file from the server then its give me one Warning: ftp_get(): Unable to build data connection: No route to host Reproduce code: --------------- $ftpobj = new ftpclass(); $ftp_server = "server_name"; $conn_id = ftp_connect($ftp_server); $ftp_user_name = "user"; $ftp_user_pass = "password"; $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); if ((!$login_result)) { echo "Attempted to connect to $ftp_server for user $ftp_user_name has failed!"; exit; } $local_file = "3026_1491378_mp.txt.gz"; $remote_file = "merchandiser/3026_1491378_mp.txt.gz"; $download = ftp_get ( $conn_id, $local_file, $remote_file, FTP_BINARY); if ($download) { echo "Successfully written to $local_file\n"; } else { echo "No such file or directory available for download \n"; } Expected result: ---------------- Successfully written to $local_file Actual result: -------------- Warning: ftp_get(): Unable to build data connection: No route to host ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32354&edit=1