Libww - Installation help...
Andrew N (andy@netadv.co.uk)
Mon, 14 Jul 1997 11:56:58 +0100
Hi All. Thanks to Gisle et al for this library, which looks absolutely =
excellent from what I have read on this group/elsewhere. I've been =
looking forward to using it for a while now, but I have been having =
problems installing it (or rather, configuring it once installed) for a =
while, so I thought I would try here for help.
The situation is: I have installed libwww on one of our linux 2.00 =
machines (mr-burns). We connect to the internet through a proxy server, =
also a linux box (called smithers) on port 8080. Installation seemed to =
go pretty smoothly, once I had installed the additional libraries =
required by libwww. The results of a `make test` follow.
---------------mr-burns:/usr/lib/perl5/site_perl/libwww-perl-5.08# make =
test
/usr/bin/perl -e 'use Config; chdir q{./blib/script}; foreach (qw(GET =
HEAD POST)
) {' \
-e 'unlink "$_";' \
-e 'system("$Config{\"lns\"} lwp-request $_") && die; }'
/usr/bin/perl t/TEST 0
base/afm............ok
base/base64.........ok
base/date...........ok
base/headers........ok
base/listing........FAILED test 5
Failed 1/6 tests, 83.33% okay
base/mediatypes.....ok
base/message........ok
base/negotiate......ok
base/quoted-print...ok
base/response.......ok
base/status.........ok
base/uri............ok
html/entities.......ok
html/headparser.....ok
html/linkextractor..ok
html/oldparse.......ok
html/parsefile......ok
html/parser.........ok
html/split..........ok
robot/rules-dbm.....ok
robot/rules.........ok
robot/ua............Useless use of gethostbyname in void context at =
/usr/lib/per
l5/Sys/Hostname.pm line 42.
ok
local/autoload......ok
local/get...........ok
local/http..........Useless use of gethostbyname in void context at =
/usr/lib/per
l5/Sys/Hostname.pm line 42.
ok
net/http-get........FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
net/http-post.......FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
net/http-timeout....FAILED test 1
Failed 1/1 tests, 0.00% okay
net/mirror..........FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
net/moved...........FAILED test 1
Failed 1/1 tests, 0.00% okay
net/proxy...........ok
Failed 6/31 test scripts, 80.65% okay. 9/649 subtests failed, 98.61% =
okay.
make: *** [test] Error 29
--------------
Although I'm not sure what the error 29 business is. :)
Next I thought I would try the tests from the t/ directory, and after =
looking at the readme decided on the following for my config.pl...
--------------
# Configure these for you local system
$httpserver =3D "smithers:8080";
$cgidir =3D "/cgi-bin/lwp";
# Used for proxy test
$ftp_proxy =3D "http://smithers/";
1;
--------------
Which I think is all correct. However, running ./TEST -v net produces a =
number of `ERROR 403 - Forbidden by rule` responses. (See below.) Can =
anyone point me towards the problem here? Are there more files I will =
need to alter somewhere, or is this a problem with our proxy server? I =
am very vague on apache, as the man pages seem to be absent on our =
server. Apologies if this is not a libwww problem.
Another point.. when I try to do=20
perl -MLWP::Simple -e 'getprint "http://www.sn.no/libwww-perl/"' from =
the command line, I get the following back..
An Error Occurred
An Error Occurred
500 - Could not connect to www.sn.no:80
Which seems to suggest that the request is not being sent via smithers =
(our web proxy). I'm sorry to confess, I'm a bit lost, and having =
searched around for a while I have managed to find much advice on using =
LWP, but little on installing it, at least, not that seemed relevant to =
my situation. I suspect that these questions are somewhat newbie-ish in =
nature; I'm hoping there's something obvious i've overlooked :)
Thanks for any help,
Andy N,
Network Advantage.
Results of TEST -v net follow.....
-------------
net/http-get........1..2
GET http://smithers:8080/cgi-bin/test?query
--- HTTP::Response=3DHASH(0x81e5adc) ---
RC: 403 (Forbidden)
Message: Forbidden - by rule
Date: Monday, 14-Jul-97 02:35:17 GMT
Server: CERN/3.0
Content-Length: 201
Content-Type: text/html
Client-Date: Mon, 14 Jul 1997 10:43:35 GMT
MIME-Version: 1.0
Title: Error
Error
Error 403
Forbidden - by rule
CERN =
httproxyd 3.0
-----------------------------------
not ok 1
not ok 2
FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
net/http-post.......1..2
--- HTTP::Response=3DHASH(0x81e5d24) ---
RC: 403 (Forbidden)
Message: Forbidden - by rule
Date: Monday, 14-Jul-97 02:35:18 GMT
Server: CERN/3.0
Content-Length: 201
Content-Type: text/html
Client-Date: Mon, 14 Jul 1997 10:43:36 GMT
MIME-Version: 1.0
Title: Error
Error
Error 403
Forbidden - by rule
CERN =
httproxyd 3.0
-----------------------------------
not ok 1
not ok 2
FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
net/http-timeout....1..1
--- HTTP::Request=3DHASH(0x81c91e0) ---
GET http://smithers:8080/cgi-bin/timeout
-----------------------------------
--- HTTP::Response=3DHASH(0x81e25e4) ---
RC: 403 (Forbidden)
Message: Forbidden - by rule
Date: Monday, 14-Jul-97 02:35:20 GMT
Server: CERN/3.0
Content-Length: 201
Content-Type: text/html
Client-Date: Mon, 14 Jul 1997 10:43:37 GMT
MIME-Version: 1.0
Title: Error
Error
Error 403
Forbidden - by rule
CERN =
httproxyd 3.0
-----------------------------------
nok ok 1
FAILED test 1
Failed 1/1 tests, 0.00% okay
net/mirror..........1..2
not ok 1
nok ok 2
FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
net/moved...........1..1
--- HTTP::Request=3DHASH(0x8177fbc) ---
GET http://smithers:8080/cgi-bin/moved
-----------------------------------
--- HTTP::Response=3DHASH(0x81ddf80) ---
RC: 403 (Forbidden)
Message: Forbidden - by rule
Date: Monday, 14-Jul-97 02:35:22 GMT
Server: CERN/3.0
Content-Length: 201
Content-Type: text/html
Client-Date: Mon, 14 Jul 1997 10:43:39 GMT
MIME-Version: 1.0
Title: Error
Error
Error 403
Forbidden - by rule
CERN =
httproxyd 3.0
-----------------------------------
not ok 1
FAILED test 1
Failed 1/1 tests, 0.00% okay
net/proxy...........1..1
ok 1
ok
Failed 5/6 test scripts, 16.67% okay. 8/9 subtests failed, 11.11% okay.