> I have tried to use html::template for the first time and tried to run > the script shown in the synopsis of cpan documentation. > > #!/usr/bin/perl -w > use HTML::Template; > > # open the html template > my $template = HTML::Template->new(filename => 'test.tmpl'); > > # fill in some parameters > $template->param(HOME => $ENV{HOME}); > $template->param(PATH => $ENV{PATH}); > > # send the obligatory Content-Type and print the template output > print "Content-Type: text/html\n\n", $template->output; > > > The following error is logged in to error log, > failed to open log file > fopen: Permission denied > [Wed Jun 3 12:38:13 2009] [error] [client 218.215.16.114] > 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. > Not sure how to resolve this error could someone please help? > wget/curl is not a replacement for the fopen() function call. Presumably your sys-admin has the idea that locking down a specific function call, will help reduce their likelyhood of being 'owned'.
Additionally, fopen() is used in lots of programs that reads/writes local files, so this restriction would break a huge amount of code. H::T uses the perl function "open()" to read the file, which (presumably) is calling the underlying system call "fopen()". One possible solution might be to use the LD_PRELOAD environmental variable, to intercept fopen(), then redirect it to wget... (good luck with that... :) Other than that, I'd suggest you ask your sys-admin to fix their security policy.... cheers, Mathew Robertson ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Html-template-users mailing list Html-template-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/html-template-users