WebFaction
Community site: login faq

i've chmoded the file base.cgi to 755 and configured perl -- according to CPAN i've successfully installed a module called 'HTML::Template', although whenever i try to import it into a script the page returns a '500 internal server error'.

i've checked my logs and they give me no errors.

here's my .cgi file:

#!/usr/bin/perl

use CGI qw(:all);
use HTML::Template; #<-- if i remove this line the script will work
use POSIX;

print header;

print 'hello';
#my $template = HTML::Template -> new(filename => 'base.tmpl');
#$template -> param(day => strftime('%A', localtime()));
#print $template -> output();

my error log reports:

[14/Aug/2014:19:35:40 +0000] "GET /base.cgi HTTP/1.0" 500 723 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"

why's it doing this

asked 14 Aug '14, 19:49

Andromeda
1114
accept rate: 0%


What is the result of the CGI script if you run it in shell?

permanent link

answered 14 Aug '14, 23:36

johns
5.4k312
accept rate: 23%

it runs it and returns no errors that i can see

(14 Aug '14, 23:39) Andromeda

When you installed it did you follow the documentation to edit the path information?

(14 Aug '14, 23:52) johns

yeah i'm quite sure i typed it all correctly.

(14 Aug '14, 23:57) Andromeda

I tried running the code as your user and received a 500 error, for premature end of script headers. Would it be possible for you to create a live file we could test or submit a support ticket so we can look closer?

(15 Aug '14, 00:29) johns

yeah i'll send in a support ticket with that information

(15 Aug '14, 01:59) Andromeda

Your script is missing execute permissions. You can fix it by running chmod 711 /home/you/webapps/whatever/base.cgi.

Hope that helps!

permanent link

answered 14 Aug '14, 23:43

seanf
12.2k41836
accept rate: 37%

nah it's still busted

(14 Aug '14, 23:56) Andromeda
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×108
×97
×31
×20
×8

question asked: 14 Aug '14, 19:49

question was seen: 4,508 times

last updated: 15 Aug '14, 01:59

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM