FTP Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Description:
------------
Warning: ftp_put(): php_connect_nonb() failed: No route to host (65)

I get this error with the reproduce code. it also says Warning: ftp_put():
Type set to I.

It is not uploading the file correctly.

i have php 4.4.1 on iPowerWeb's server, so no upgrade is possible.

Thanks in Advance

Reproduce code:
---------------
$conn_id = ftp_connect("ftpServer");
$login_result = ftp_login($conn_id, "userName", "passWord");
ftp_pasv($conn_id, true);
if ((!$conn_id) || (!$login_result)) {
       echo "FTP connection has failed!";
       echo "Attempted to connect to stp server for user username";
       exit;
   } else {
       echo "Connected to ftp server, for user user";
   }
$upload = ftp_put($conn_id, "bgd.txt", "bgdlocal.txt", FTP_BINARY);
if (!$upload) {
       echo "FTP upload has failed!";
   } else {
       echo "Uploaded $source_file to $ftp_server as $destination_file";
   }
// close the FTP stream
ftp_close($conn_id);

Expected result:
----------------
Uploaded $source_file to $ftp_server as $destination_file

Actual result:
--------------
Warning: ftp_put(): php_connect_nonb() failed: No route to host (65) in
/home/beachgla/public_html/catalog/update/index.php on line 475

Warning: ftp_put(): Type set to I. in
/home/beachgla/public_html/catalog/update/index.php on line 475

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux