FW: Error using html::template

Sanjeewa Fernando <[email protected]> Thu, 4 Jun 2009 11:01:24 +1000
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
--===============2222093444952772866==
Content-Type: multipart/alternative;
	boundary="_cdbe8d69-e7be-43b8-9155-baabca0719d7_"

--_cdbe8d69-e7be-43b8-9155-baabca0719d7_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Hi=2C

I have tried to use html::template for the first time and tried to run the =
script shown in the synopsis of cpan documentation.=20

#!/usr/bin/perl -w
  use HTML::Template=3B

  # open the html template
  my $template =3D HTML::Template->new(filename =3D> 'test.tmpl')=3B

  # fill in some parameters
  $template->param(HOME =3D> $ENV{HOME})=3B
  $template->param(PATH =3D> $ENV{PATH})=3B

  # send the obligatory Content-Type and print the template output
  print "Content-Type: text/html\n\n"=2C $template->output=3B


The following error is logged in to error log=2C
  failed to open log file
  fopen: Permission denied
  [Wed Jun 3 12:38:13 2009] [error] [client 218.215.16.114]=20
  Premature end of script headers: /cgi-bin/bpo/test.cgi

When I checked with the hosting server admin their reply is they have
restricted the use of FOPEN function and to use WGET or CURL.=20
Not sure how to resolve this error could someone please help?

Regards=2C
Sanjeewa.



_________________________________________________________________
Looking for a new car this winter? Let us help with car news=2C reviews and=
 more
http://a.ninemsn.com.au/b.aspx?URL=3Dhttp%3A%2F%2Fsecure%2Dau%2Eimrworldwid=
e%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813=
%2Fai%5F859641&_t=3D762955845&_r=3Dtig_OCT07&_m=3DEXT=

--_cdbe8d69-e7be-43b8-9155-baabca0719d7_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style>
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Verdana
}
</style>
</head>
<body class=3D'hmmessage'>
<br>Hi=2C<br><br>I have tried to use html::template for the first time and =
tried to run the script shown in the synopsis of cpan documentation. <br><b=
r>#!/usr/bin/perl -w<br><pre>  use HTML::Template=3B<br><br>  # open the ht=
ml template<br>  my $template =3D HTML::Template-&gt=3Bnew(filename =3D&gt=
=3B 'test.tmpl')=3B<br><br>  # fill in some parameters<br>  $template-&gt=
=3Bparam(HOME =3D&gt=3B $ENV{HOME})=3B<br>  $template-&gt=3Bparam(PATH =3D&=
gt=3B $ENV{PATH})=3B<br><br>  # send the obligatory Content-Type and print =
the template output<br>  print "Content-Type: text/html\n\n"=2C $template-&=
gt=3Boutput=3B<br><br><br>The following error is logged in to error log=2C<=
br>  failed to open log file<br>  fopen: Permission denied<br>  [Wed Jun 3 =
12:38:13 2009] [error] [client 218.215.16.114] <br>  Premature end of scrip=
t headers: /cgi-bin/bpo/test.cgi<br><br>When I checked with the hosting ser=
ver admin their reply is they have<br>restricted the use of FOPEN function =
and to use WGET or CURL. <br>Not sure how to resolve this error could someo=
ne please help?<br><br>Regards=2C<br>Sanjeewa.<br><br><br></pre><br /><hr /=
>Let us help with car news=2C reviews and more <a href=3D'http://a.ninemsn.=
com.au/b.aspx?URL=3Dhttp%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Db=
in%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=
=3D762955845&_r=3Dtig_OCT07&_m=3DEXT' target=3D'_new'>Looking for a new car=
 this winter?</a></body>
</html>=

--_cdbe8d69-e7be-43b8-9155-baabca0719d7_--


--===============2222093444952772866==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
--===============2222093444952772866==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Html-template-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/html-template-users

--===============2222093444952772866==--