[htmltmpl] HTML::Template
Brought to you by:
samtregar
From: Robert <rg...@ya...> - 2004-08-03 17:29:48
|
Hi list, I am testing HTML::Template with a sample script, I can run the script from command line which is working fine but when I run it from browser (http://webserver/cgi-bin/test1-cgi) I am getting the following error Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, yo...@yo...dress and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. --------------------------------- Apache/1.3.26 Server at aegdbs001.aegislink.com Port 80 I checked in the web server logs, I see the following errors in the error log [Tue Aug 3 10:47:11 2004] [error] [client 10.15.18.120] malformed header from s cript. Bad header=<HTML>: /var/apache/cgi-bin/test1-cgi [Tue Aug 3 11:34:52 2004] [error] [client 10.15.18.120] malformed header from s cript. Bad header=<HTML>: /var/apache/cgi-bin/test1-cgi Script test1-cgi #!/usr/bin/perl use HTML::Template; # open the html template my $template = HTML::Template->new(filename => '/home/raj/www/test/test.tmpl'); # fill in some parameters $template->param( HOME => $ENV{HOME}, PATH => $ENV{PATH}, ); # print the template print $template->output; Template: bash-2.03$ cat test.tmpl <HTML> <HEAD><TITLE>Test Template</TITLE> <BODY> My Home Directory is <TMPL_VAR NAME=HOME> <P> My Path is set to <TMPL_VAR NAME=PATH> </BODY> </HTML> Anyone know what could be the problem?. Thanks in advance |