473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

Sep 22 '06 #1
0 1252

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Freddie | last post by:
Hi, I've been mangling python-irclib into an asyncore class, so it fits in nicely with the rest of my app. I ran into a problem with asyncore.dispatcher_with_send (Python 2.3.4), though. Not...
4
by: 21novembre | last post by:
Hi all, I got a quite strange problem when I tried to setup a database backup shell. I put it this way: "bin/mysqldump --opt --user=xxx --password=xxx DB > DB.bak" However, error 1045 came to...
1
by: chris.rust | last post by:
Has anyone else had any trouble setting up a sitemap view to be filtered by roles? We've put a cust role provider in place, and we can verify that it's only being called once for each...
0
by: acwomble | last post by:
I am working with a database on another system via a ssh tunnel using plink. We have setup an alias the local system for the remote database. I am able to connect and work from within Visual...
0
by: John Salerno | last post by:
Is anyone else having trouble? It worked for me last night, but now it's saying: C00D11BD: Cannot play the file Windows Media Player cannot play the file because the specified protocol is not...
5
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop and created the sample database. Now I'm having truble connecting to the database from Command Editor. If I connect from Command Window it's...
8
by: Claudia Fong | last post by:
Hi, I'm trying to connect to a sql db with my C# applciation but I'm having trouble to connect.. It said - Error accessing the database: Cannot open database "LibDB" requested by the login. The...
0
by: mrchatgroup | last post by:
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup...
0
by: brum2008 | last post by:
Hello! Below is the Netbeans Mobility source code for my application (The application offers SPP service, and then just hangs waiting for a client to connect (using acceptAndOpen()). The other...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.