Jump to content

Recommended Posts

Posted

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.

Posted

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;

Posted

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.

Posted

Yes, I'm on the Johnny server.

Cpanel seems to have fixed itself, and I updated the permissions for the script you provided but it still doesn't run.

Posted

Johnny is still down. Once Johnny is back up refresh your cache or rename the file and try the script I posted again.

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