Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Paul Winkler on October 16, 2002, 03:01:18 PM

Title: cgi scripts
Post by: Paul Winkler 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.
Title: Re: cgi scripts
Post by: Terry Brummell on October 17, 2002, 03:25:23 AM
did you make the cgi file executable?

chmod 755 cgi_script_name
Title: Re: cgi scripts
Post by: Nathan Fowler 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.
Title: Re: cgi scripts
Post by: Jon Cox 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.
Title: Re: cgi scripts
Post by: Greg Zartman 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
Title: Re: cgi scripts
Post by: Phil Hyde 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
Title: Re: cgi scripts
Post by: Paul Winkler 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