Re: Net::FTP problem



soup_or_power@xxxxxxxxx wrote:
The following code is generating the error: can't connect (in the code
below) I'm guessing the FTP is sending the username and hostname
separated by @ instead of sending just the host name followed by user
name and password and commands.

Net::FTP will never send user:pass@host, because this is just a way some clients allow the data to be entered. However, your code doesn't even reach the login line.

It worked fine for some time but now
quit on me. Thanks for any of your help.

So something must have been changed. Did you alter your script in some other parts? If no, has the server been altered (ip changed, ftp daemon stopped)? Has someone changed the firewall you are behind (if there is one)? Does your

sub get_ftp_handle {
  my($self, $ftp_host, $ftp_user, $ftp_pwd)=@_;

  my $ftp_site = $ftp_host || "storm";
  my $ftp_pass = $ftp_pwd || "pqww2o4";
  $ftp_user ||=  "qauser";

  my $ftp = Net::FTP->new($ftp_site) || do {
     warn "$ftp_user\@$ftp_site: can't connect\n";
     return -1;
  };

From the perldoc of Net::FTP's constructor: ------------------------------------------------------------ If the constructor fails undef will be returned and an error message will be in $@. ------------------------------------------------------------

So make the code above
  my $ftp = Net::FTP->new($ftp_site) or do {
    warn "Unable to connect to $ftp_site. Error is: $@\n";
    return -1;
  };
to find out why the connection failed.

HTH
-Chris
.



Relevant Pages

  • Re: Publisher and 1&1
    ... Problem 1: Received the following error message: "This error message is ... change the FTP proxy settings to allow access ... To use Publisher read the following article: ... 1&1 is not really clear about how and where to upload your files. ...
    (microsoft.public.publisher.webdesign)
  • Re: Publisher and 1&1
    ... Problem 1: Received the following error message: "This error message is ... usually associated with an attempt to access an FTP ... To use Publisher read the following article: ... 1&1 is not really clear about how and where to upload your files. ...
    (microsoft.public.publisher.webdesign)
  • ftp firewall issue
    ... norton IS 2005 on a windows xp system. ... This error message is usually associated with an attempt to access an FTP ... change the FTP proxy settings to allow access ...
    (microsoft.public.publisher.webdesign)
  • Re: network
    ... I can ping and ftp to this box, but can't access it through telnet or ... The error message is "could not open connection to the host ...
    (Fedora)
  • Re: Uploading
    ... You no longer have FrontPage extensions on your site - your host may have removed them. ... You really should have started your own thread - problems with FP extensions have little to do with problems with FTP ... What is the exact error message? ...
    (microsoft.public.frontpage.client)