V
vincenieuw
Guest
Hi,
On a FC4, Plesk 8.0 Server the perl module LWP::UserAgent does not seem to work.
I tried to ping and dig the domains holding the xml files, that worked fine.
The results in the shell are all right, so dns seems to work from shell.
I tried to completely disable the firewall and then tried again from http and still no result.
If I add the domainname in the hosts file (although a ping from shell works!) I get this error:
============
500 Can't connect to www.domainname.com:80 (connect: Permission denied)
============
If I don’t add the domainname in de the hosts file I get this error:
============
500 Can't connect to www.domainname.com:80 (Bad hostname ' www.domainname.com')
============
In Cpan I reinstalled the module LWP::UserAgent and it’s there.
When I run the .pl script from the shell it works fine also.
The script contains no more than:
=============
#!/usr/bin/perl
require LWP::UserAgent;
print "Content-type: text/html\n\n";
print "<html>";
print "<body>";
$sUrl = "http://www.domainname.com/feeds/document1.xml";
$oUserAgent = new LWP::UserAgent;
$oUserAgent->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)");
$oHTTP = new HTTP::Request 'GET', "$sUrl";
$oResponse = $oUserAgent->request($oHTTP);
$sResponse = $oResponse->content;
print "<b>$sUrl</b>";
print "<xmp>$sResponse</xmp>";
print "<hr />";
print "</body>";
print "</html>";
=============
Does anyone know what can be the problem?
Thanks in advance.
On a FC4, Plesk 8.0 Server the perl module LWP::UserAgent does not seem to work.
I tried to ping and dig the domains holding the xml files, that worked fine.
The results in the shell are all right, so dns seems to work from shell.
I tried to completely disable the firewall and then tried again from http and still no result.
If I add the domainname in the hosts file (although a ping from shell works!) I get this error:
============
500 Can't connect to www.domainname.com:80 (connect: Permission denied)
============
If I don’t add the domainname in de the hosts file I get this error:
============
500 Can't connect to www.domainname.com:80 (Bad hostname ' www.domainname.com')
============
In Cpan I reinstalled the module LWP::UserAgent and it’s there.
When I run the .pl script from the shell it works fine also.
The script contains no more than:
=============
#!/usr/bin/perl
require LWP::UserAgent;
print "Content-type: text/html\n\n";
print "<html>";
print "<body>";
$sUrl = "http://www.domainname.com/feeds/document1.xml";
$oUserAgent = new LWP::UserAgent;
$oUserAgent->agent("Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)");
$oHTTP = new HTTP::Request 'GET', "$sUrl";
$oResponse = $oUserAgent->request($oHTTP);
$sResponse = $oResponse->content;
print "<b>$sUrl</b>";
print "<xmp>$sResponse</xmp>";
print "<hr />";
print "</body>";
print "</html>";
=============
Does anyone know what can be the problem?
Thanks in advance.