Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NET::FTP , strange problem

Status
Not open for further replies.

math

Programmer
Mar 21, 2001
56
BE
Hi,
I'm running a windows2000 IIS with activestate perl...
I have made a script that uses NET::FTP... On my server, the script works great... but when I execute it from a remote computer it doesn't upload the file ???

So, When i run the script on the host itself, it works and uploads the file to the remote-ftp-server but when I connect with an other pc, the script works but doesn't upload?? What am I doing wrong? is it some setting??

Does anyone have an idea?
Thanx,
math
 
math,
your question is way to broad. Might it be possible to narrow in on the portion of the code that you think might be the problem and post that? Also, your discriptions of what you are trying to do from what computer are ambiguous. Maybe I'm a little dense, but, I need a little more meat to dig into. There are so many issues involved in what you are trying to do that it would be difficult to guess at where the stumble is happening.

Good Luck


keep the rudder amid ship and beware the odd typo
 
sub ftp
{
$ftp = Net::FTP->new($host)|| die "cannot connect";
$ftp->login($user,$pass)|| die "cannot login";
$ftp->binary();
$ftp->cwd('/upload')|| die "no dir";
$ftp->put($file)|| die "cannot send file";
$ftp->quit;
&Completed
}


Goboating, Your right !!! but I don't know how to explain it... Some background info, the script first asks a username and password. after that is checked and verified, it gives the user a form in which he can select which file to upload (browse-button). When he hits the "upload"-button, this sub is executed...
AND NOW... (the problem)
When I access/test the script from an other computer, everything works BUT not the upload... (it gives no faults)
When I run the script on the server (IIS) itself (just by typing the same address as everyone should in IE) than It does upload??? It's like the Net::FTP module is only working on the host itself and not for those that access the host through the internet???

Goboating, I hope this is better, it's not narrower... but maybe more clear??

Thanx in advance,
math
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top