From:             amit2001_shah at yahoo dot com
Operating system: Linux
PHP version:      4.3.8
PHP Bug Type:     FTP related
Bug description:  Warning: ftp_get(): Unable to build data connection: No route 
to host

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 bug report at http://bugs.php.net/?id=32354&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32354&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32354&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32354&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32354&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32354&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32354&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32354&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32354&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32354&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32354&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32354&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32354&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32354&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32354&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32354&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32354&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32354&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32354&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32354&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32354&r=mysqlcfg

Reply via email to