develooper Front page | perl.beginners | Postings from February 2002

Perl-CGI-script for communication via webserver Thttpd

Hein ten Rouwelaar
February 26, 2002 09:16
Perl-CGI-script for communication via webserver Thttpd
Message ID:

I am a newbe in Perl. I installed the webserversoftware thttpd-2.20b-4 on a
RedHat Linux 7.1 host (hostname "linux"). Browser on client

Now I wrote the html page below which calls the perl script printed below

The query displays nice on my browser (IE5.0)and I can submit the answers.
Now one would expect the output of the perl-cgi script to be displayed by
the browser. But nothing whatsoever is send to the browser at all.

The logging from the webserver (thttpd) shows the GET ..... message from the
submit is received from the browser. The webscreen on the browser is blanked
and that's it.

The directory cgi-bin is a subdirectory of my homedir which is laso the
current workingdir of the webserver.
The modebits of the htmlpage are 644 and of the perl-cgi script 755. The
directory has 755.

Has anybody any guess what I am missing here ???

----HTML page----

<H1>Fill in please</H1>
<FORM METHOD="GET" ACTION="/cgi-bin/">
Length: <INPUT TYPE="TEXT" NAME="Length">


----Perl-CGI script----


use CGI qw/:cgi/;

$Lt = param("Age");
print header();
print p("Your age is $Lt");

----Thttpd logging---- - - [25/Feb/2002:21:45:22 +0100] "HEAD /guest.html HTTP/1.1" 304
279 "" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)" - - [25/Feb/2002:21:45:30 +0100] "GET
/cgi-bin/ HTTP/1.1" 200 50000
"http://linux/guest.html" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95;
DigExt)" Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About