develooper Front page | perl.libwww | Postings from March 2003

Bad Protocol 'tcp'

Thread Next
From:
John Pesce
Date:
March 21, 2003 23:58
Subject:
Bad Protocol 'tcp'
Message ID:
Pine.LNX.4.44.0303220250390.27511-100000@foobar.sprl.erau.edu
I'm attemping to use LWP from my ISP that uses CPanel 5.0 and virtual 
hosting.

When I try to use any LWP functions they all fail with the error:

500 Can't connect to www.somewhere.com:80 (Bad protocol 'tcp') 

I can use my simple test script from other hosted domains using CPanel 5.0

What does this mean? What is wrong with my ISPs server? He says he doesn't 
have a clue.

perldiver.pl reports:

Perl Executable: /usr/bin/perl 
Perl Version: 5.006001 
PERL compile version OS: linux 
GID: (If not blank, you are on a machine that supports membership in 
multiple groups simultaneously) 32160 
GATEWAY_INTERFACE CGI/1.1 
PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin 
SHELL /usr/local/cpanel/bin/noshell  



My script is listed below:


#!/usr/bin/perl -w

use LWP::Simple;
use diagnostics -verbose;
#use Socket;
#use Sys::Hostname;

print "Content-type:text/html\n\n";
print "<HTML><HEAD>";

print "<TITLE>pagetitle</title>";
print "</head>";
print "<BODY>";

getprint ("http://www.cnn.com/");

print "</body></html>";






Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About