php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32354 Warning: ftp_get(): Unable to build data connection: No route to host
Submitted: 2005-03-17 14:57 UTC Modified: 2005-03-25 01:46 UTC
Votes:5
Avg. Score:3.6 ± 1.5
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:4 (100.0%)
From: amit2001_shah at yahoo dot com Assigned:
Status: No Feedback Package: FTP related
PHP Version: 4.3.8 OS: Linux
Private report: No CVE-ID: None
 [2005-03-17 14:57 UTC] 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 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-25 01:46 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 18:01:27 2024 UTC