Jump to content

[Solved] Cannot Execute Cgi Scripts


Acren

Recommended Posts

Hi there, I've been trying to get a CGI hello world script working, but nothing at all seems to work. I've tried python, I've tried perl, I've tried running from both cgi-bin and root, I've tried renaming to both .cgi and .py, set permissions, deleted and recreated the files, nothing works at all. They all give 500: Internal server error.

 

What can I do about this?

 

Thanks.

Link to comment
Share on other sites

You haven't edited your .htaccess file have you?

 

This script should work for you as long as it ends in .cgi or.pl and you give it file permissions 755.

 

#!/usr/bin/perl -w
use CGI ':standard';
$current_time = localtime;
print header,
start_html('A Virtual Clock'),
h1('A Virtual Clock'),
"The current time is $current_time - PST.",
hr,
end_html;

Link to comment
Share on other sites

Thanks for your reply.

I tried that script, but it also give a 500. My htaccess is blank, is it supposed to be?

 

Edit: Actually, I forgot to change the permissions for it, but I can't access the control panel, it's also giving error 500.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...