Koozali.org: home of the SME Server

cgi scripts

Paul Winkler

cgi scripts
« on: October 16, 2002, 03:01:18 PM »
"Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request."

This is the message we get when we try to run a cgi script from an ibay

We have cgi scripts enabled in server manager but it don't work, what else must we do

We also can't seem to get them working from the 'primary' folder.

Please help.

Terry Brummell

Re: cgi scripts
« Reply #1 on: October 17, 2002, 03:25:23 AM »
did you make the cgi file executable?

chmod 755 cgi_script_name

Nathan Fowler

Re: cgi scripts
« Reply #2 on: October 17, 2002, 07:39:31 PM »
Did you enable dynamic script execution (PHP/CGI) when you created the IBAY?  That's an option.

Jon Cox

Re: cgi scripts
« Reply #3 on: October 18, 2002, 12:18:50 AM »
Did you try it with a simple cgi script ? e.g.:

#!/usr/bin/perl
#===============================
# Testing CGI script installation
# Copyright 1999, Free Perl Code
# Created 08/15/99
#===============================
# This script is designed to test
# CGI script installation
#===============================
print "Content-type: text/plain", "\n\n";

print "Hello World!";

if that works and yours doesn't then check the syntax of your cgi script from the command line.

>perl -c - will check the context is ok.

Greg Zartman

Re: cgi scripts
« Reply #4 on: October 18, 2002, 01:49:10 AM »
Throw this at the head of your script, but after the perl shebang.

use CGI::Carp qw(fatalsToBrowser)

It will direct commandline type errors to the browser instead of just reporting the useless Error 500 message.

Greg

Phil Hyde

Re: cgi scripts
« Reply #5 on: October 20, 2002, 04:44:32 AM »
look at the httpd error log for your server.  this might give some insight why the script is failing.

for instance, I was able to figure out that the script I was trying required a higher version of glibc.

--phil

Paul Winkler

Re: cgi scripts
« Reply #6 on: October 28, 2002, 05:11:51 AM »
Yes we did,  before we even tried running the scripts

we have also made the script executable
 
"chmod 755 cgi_script_name"

any other ideas pls help!

Regards