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:4
Avg. Score:3.5 ± 1.7
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:3 (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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: amit2001_shah at yahoo dot com
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Fri Jan 17 16:01:24 2020 UTC