Acren Posted July 18, 2012 Share Posted July 18, 2012 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 More sharing options...
Byron Posted July 18, 2012 Share Posted July 18, 2012 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 More sharing options...
Acren Posted July 18, 2012 Author Share Posted July 18, 2012 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 More sharing options...
Byron Posted July 18, 2012 Share Posted July 18, 2012 Are you on the Johnny server. he seems to be down at the moment. Link to comment Share on other sites More sharing options...
Acren Posted July 18, 2012 Author Share Posted July 18, 2012 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. Link to comment Share on other sites More sharing options...
Byron Posted July 18, 2012 Share Posted July 18, 2012 Johnny is still down. Once Johnny is back up refresh your cache or rename the file and try the script I posted again. Link to comment Share on other sites More sharing options...
Recommended Posts