G
garrett.hennessey
Hello -
I have searched endlessly for a solution to the following problem. I am
trying to use various packages within the perl 'Net' package (ie.
Net::FTP, Net::SMTP, etc). Everytime I try to use these packages I get
the following error: Net::FTP: Bad protocol 'tcp'. I also get this
error when using ppm.
I am using Active Perl and also cygwin perl, and they both exhibit the
same error.
One important thing to note is that I do not have this problem on other
computers on my network. All the computers are running either Windows
200 or XP. Searching through the newsgroups and mailing list archives
at Active Perl, I've found multiple people suggest adding an
environment variable for http_proxy, but I am not behind a proxy. Also
people have suggested checking for the file protocol in
c:\winnt\system32\drivers\etc directory. This file exisits and is the
same as other computers on my netwok where this all works.
One big clue I have is that any call to 'getprotobyname' returns an
empty string. This is also true for 'getprotobynumber'. This same call
on the other computers returns the appropriate values as indicated in
the protocol file.
Here's some example code:
use strict;
use warnings;
use Net::FTP;
my $hostname = '192.168.1.211';
my $username = 'xxxx'; # removed username
my $password = 'xxxxx'; # removed passoword
my $ftp = Net::FTP->new("192.168.1.211", Debug => 1)
or die "Cannot connect to 192.168.1.211: $@";
which produces:
Cannot connect to 192.168.1.211: Net::FTP: Bad protocol 'tcp' at ftp.pl
line 9.
Any help would be greatly appreciated!
Thanks,
Garrett Hennessey
I have searched endlessly for a solution to the following problem. I am
trying to use various packages within the perl 'Net' package (ie.
Net::FTP, Net::SMTP, etc). Everytime I try to use these packages I get
the following error: Net::FTP: Bad protocol 'tcp'. I also get this
error when using ppm.
I am using Active Perl and also cygwin perl, and they both exhibit the
same error.
One important thing to note is that I do not have this problem on other
computers on my network. All the computers are running either Windows
200 or XP. Searching through the newsgroups and mailing list archives
at Active Perl, I've found multiple people suggest adding an
environment variable for http_proxy, but I am not behind a proxy. Also
people have suggested checking for the file protocol in
c:\winnt\system32\drivers\etc directory. This file exisits and is the
same as other computers on my netwok where this all works.
One big clue I have is that any call to 'getprotobyname' returns an
empty string. This is also true for 'getprotobynumber'. This same call
on the other computers returns the appropriate values as indicated in
the protocol file.
Here's some example code:
use strict;
use warnings;
use Net::FTP;
my $hostname = '192.168.1.211';
my $username = 'xxxx'; # removed username
my $password = 'xxxxx'; # removed passoword
my $ftp = Net::FTP->new("192.168.1.211", Debug => 1)
or die "Cannot connect to 192.168.1.211: $@";
which produces:
Cannot connect to 192.168.1.211: Net::FTP: Bad protocol 'tcp' at ftp.pl
line 9.
Any help would be greatly appreciated!
Thanks,
Garrett Hennessey