Trouble connecting with FTP



Hi,

I'm using PHP 4.3 on Apache 2, connecting to a VSFTP server running on
Fedora Core 5. The Fedora machine is my home computer, which sits
behind a router. I have opened up the FTP port, and I can connect fine
from an FTP client if I'm using active mode. However the following
code fails to upload a file

// set up basic connection
$conn_id = ftp_connect($ftp_host);
if ($conn_id) {
// login with username and password
$login_result = ftp_login($conn_id,
$ftp_user, $ftp_pwd);
if ($login_result) {
// Disable passive mode
ftp_pasv($conn_id, false);

// upload the file
$remote_path = "$ftp_dir/" .
SQL_PRODUCT_SHORT_FILE_NAME;
ftp_delete($conn_id,
$remote_path);
// line 96
$upload = ftp_put($conn_id,
$remote_path, $sql_file_path, FTP_ASCII);
// check upload status
if (!$upload) {
die("FTP upload has
failed!");
}
with the following

Warning: ftp_put() [function.ftp-put]: Failed to establish connection.
in /usr/local/apache2/htdocs/super_admin_rs/sa_prod_fns.php on line 96
FTP upload has failed!

I have verified that the file in question exists. Any other ideas on
how I can troubleshoot this problem?

Thanks, - Dave

.



Relevant Pages

  • Re: slow speed between ftp server and client
    ... > We are getting speeds of 14KB/s ... UK ADSL typically uas an upload of 256Kbit/sec, even if you have 2Mbit down. ... This will limit your FTP upload to around 30KBytes/sec. ... Try connecting from another user on the same ISP. ...
    (microsoft.public.windowsxp.network_web)
  • Re: slow speed between ftp server and client
    ... >> my ftp server is in britain, and my friend is connecting in the USA. ... > UK ADSL typically uas an upload of 256Kbit/sec, even if you have 2Mbit down. ... > Try connecting from another user on the same ISP. ...
    (microsoft.public.windowsxp.network_web)
  • Re: slow speed between ftp server and client
    ... >>> my ftp server is in britain, and my friend is connecting in the USA. ... the upload speed is less than the download. ... >> Try connecting from another user on the same ISP. ...
    (microsoft.public.windowsxp.network_web)
  • Problems uploading large files to some web sites (long)
    ... NATted OBSD 3.1 running pf with all internal hosts connecting via ethernet through a switch or a wireless access point connected to the switch. ... On or about the time the servers were moved to the Yahoo net I became unable to upload photos via their upload form. ... Trying the same tests on my home network, but with my desktop connected via a VPN to the office network. ...
    (comp.unix.bsd.openbsd.misc)
  • Re: Publisher and 1&1
    ... In other words, clean up the folder. ... change the FTP proxy settings to allow ... To use Publisher read the following ... this is your root directory and where you upload your Publisher ...
    (microsoft.public.publisher.webdesign)