Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 02-13-2008, 02:11 PM   #1 (permalink)
Junior Member
 
Vinic's Avatar
 
Join Date: 02-13-08
Posts: 6
iTrader: 0 / 0%
Latest Blog:
None

Vinic is liked by many
Question Quirky FTP Problem

Hi Folks,

I'm using some perl script running on a local server that uploads files to a remote server every 10 minutes. Everything has been running fine for months (and did so for a few months last year, similar script). But recently I've seen an odd problem; the only text file that's being uploaded ends up as a bunch of jibberish (this is just a sample, it ends up being several dozen lines of the same):

Quote:
IHDR&= IDATx{xSUo.I:0E,J[>U&u2*(Tf&%U
First suspect is a recent upgrade that my ISP did, and some problem from their side is still not ruled out. But then I noticed that I had been setting the ftp mode to binary, so switched to ascii (default). Thought that did the trick, but then later noticed it doing it again. It won't do it all the time, just sporatically.

Here's the perl script used to upload the files:

Quote:
sleep(25);

use Net::FTP;

$ftp = Net::FTP->new("www.peacefulbend.com", Debug => 0)
or die "Cannot connect to some.host.name: $@";

$ftp->login("user",'password')
or die "Cannot login ", $ftp->message;

$ftp->cwd(" ")
or die "Cannot change working directory ", $ftp->message;

#$ftp->binary();

$ftp->put( "c:/digi/temptable.txt" , "peacefulbend.com/temperatures/temptable.txt")
or die "get failed ", $ftp->message;



$ftp->quit;
I added the delay to see if it might be a time conflict with the other uploads (two more which ARE binary, about 15 kb each, with similar time delays added)

Here's the page that it's being displayed, via SSI:

http://peacefulbend.com/temperatures/temperatures.shtml


Any ideas? Anybody?

tia

Last edited by Cricket : 02-13-2008 at 03:32 PM.
Vinic is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 02-14-2008, 01:34 PM   #2 (permalink)
v7n Mentor
 
Join Date: 07-24-06
Posts: 688
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nice
Have you tried to see what happens when Debug => 1 ?
nasty.web is online now  
Add Post to del.icio.us
Reply With Quote
Old 02-14-2008, 01:35 PM   #3 (permalink)
v7n Mentor
 
Join Date: 07-24-06
Posts: 688
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nice
Also do you use warnings?
nasty.web is online now  
Add Post to del.icio.us
Reply With Quote
Old 02-14-2008, 03:53 PM   #4 (permalink)
Junior Member
 
Vinic's Avatar
 
Join Date: 02-13-08
Posts: 6
iTrader: 0 / 0%
Latest Blog:
None

Vinic is liked by many
Thanx for the nasty reply. I just now set the debug (duh, like I even had the switch there already) we'll see if we can catch it with it on. Have only noticed the problem happen once since I posted this yesterday. The next upload usually corrects it. Have increased the sleep on each upload.... like I mentioned before, suspect are delays from my slow host server and possibly my isp; they both seem to going thru upgrades at the same time.. argh!! . Increasing the delay between uploads should not be an issue with my setup, up to the 10 minute interval that the temperatures are being read. Even that 10 minutes could be lengthened, though that would take a bit more work as much of the graphing script revolves around it.

By "warnings" are you speaking of -w? I know I had this on when first writing the program, but turned it off to keep things from running too slow. Also, I thought this would only catch a syntax error; not an erratic problem like I'm seeing!? As may be obvious, I'm quite the noob with perl, so please correct me if this is wrong. I turned it back on along with the debug, just to see.

Have you ever used Log::Log4perl ?

Part of my problem is the sporactic character of this problem. As far as I know, I have to be watching when it happens. I haven't see it in the error logs.

Thanx for your help.
Vinic is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-15-2008, 12:31 AM   #5 (permalink)
v7n Mentor
 
Join Date: 07-24-06
Posts: 688
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nice
Quote:
Originally Posted by Vinic View Post
T
By "warnings" are you speaking of -w? I know I had this on when first writing the program, but turned it off to keep things from running too slow. Also, I thought this would only catch a syntax error; not an erratic problem like I'm seeing!? As may be obvious, I'm quite the noob with perl, so please correct me if this is wrong. I turned it back on along with the debug, just to see.
Code:
use warnings;
It may help your to notice what's wrong. Syntax errors are cached by parser

Quote:
Have you ever used Log::Log4perl ?
no, I haven't.

Quote:
Part of my problem is the sporactic character of this problem. As far as I know, I have to be watching when it happens. I haven't see it in the error logs.

Thanx for your help.
nasty.web is online now  
Add Post to del.icio.us
Reply With Quote
Old 03-05-2008, 12:28 PM   #6 (permalink)
Junior Member
 
Vinic's Avatar
 
Join Date: 02-13-08
Posts: 6
iTrader: 0 / 0%
Latest Blog:
None

Vinic is liked by many
Just wanted to make a final note here. At this point I'm 99% sure that this problem was server specific. I was having multiple issues with db access on a previous host, and now after switching to another host, all of those issues have gone away. Most of the issues were related to time outs.

Thanx so much for your help.... I did learn a wee bit more than before, though I'm not sure the loss of hair was worth it!!
Vinic is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Google's China Problem (and China's Google Problem) - NYTimes Sunday Mag (4/23/06) Julie Google Forum 3 09-18-2007 01:00 AM
Problem with godaddy. Post your problem here!! charlesgan Web Hosting Forum 7 05-09-2007 09:36 AM
I got a BIG problem :( HenryH SEO Forum 3 03-23-2006 12:00 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:04 PM.
© Copyright 2008 V7 Inc

Click Here