PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Iron Speed
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old July 17th, 2002, 07:36 AM
charlottehomes charlottehomes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 3 charlottehomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Php/ftp Help!

To whome it may concern:

I don't really know where else to turn...I can't find any information on this subject anywhere on the net.

I'm developing an ftp driver using PHP, and I have run into some problems.

I can log into the server, look at the files, check the time stamps, etc.; however, when I go to download a file, using ftp_get(), the server times out after the default 90 seconds. I know the script attempts to grab the file, because the file shows up on my server with a size of 0 k.

I suspect I am having a permissions problem. I changed permissions around and got the script to work eventually. Then I tried downloading another file with the same script and permissions and ran into the same problem. So, I went back to the original working script, and it no longer worked. I didn't even change anything.

Also...this happens with any ftp server I attempt to access and transfer files.

Finally, I am trying to transfer files from an ftp site to a web server.

Do you have any ideas what may be causing this problem?

Sincerely,

Mark E. Mcewen

Reply With Quote
  #2  
Old July 17th, 2002, 08:10 PM
jjoske jjoske is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 4 jjoske User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I had a similar problem once, I ended up setting the FTP mode to passive which solved the problem.

Reply With Quote
  #3  
Old July 18th, 2002, 11:55 AM
charlottehomes charlottehomes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 3 charlottehomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE:

I tried changing the passive mode, but I get an error for that too. It will not allow me to change the mode. Any other suggestions?

Reply With Quote
  #4  
Old July 18th, 2002, 02:57 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,246 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
Would it be possible to post the code you're using? This may help determine the problem.

Also, are you specifying the transfer mode (FTP_ASCII / FTP_BINARY)? Here's some more information for you.
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
  #5  
Old July 18th, 2002, 03:03 PM
charlottehomes charlottehomes is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 3 charlottehomes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE:

This is my code in a nutshell. I have a more interesting version that does some other things...but it is useless until I can get this to work...

// login with username and password

$login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass");

// check connection
if ((!$conn_id) || (!$login_result)) {
echo "Error: Ftp connection has failed!<BR>";
echo "Attempted to connect to $ftp_server for user $ftp_user_name<BR>";
die;
}
else {
echo "Connected to $ftp_server, for user $ftp_user_name<BR>";
}

// download the file
$download = ftp_get($conn_id, $localfile, $remotefile, FTP_BINARY);

// check upload status
if (!$download) {
echo "Ftp download has failed!<BR>";
}
else {
echo "Downloaded $remotefile to $ftp_server as $localfile<BR>";
}

// close the FTP stream
ftp_quit($conn_id);

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Php/ftp Help!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway