Koozali.org: home of the SME Server

CGI - Internal Server Error

Trevor Wendt

CGI - Internal Server Error
« on: September 13, 2001, 06:39:18 AM »
Hello all... I am having some problems getting cgi script's to execute on my e-smith server.  First off, I am new to linux and e-smith but so far I have had an excellent experience with it all and thanks to everyone who writes HOWTO's and produces modules.  

Now to the problem:  I am receiving an "Internal Server Error" when I try to execute a test cgi (perl based) script. {view script below} I copied the cgitest.pl and cgitest.cgi scripts to the proper ibay's cgi-bin.  I have chmod 'ed the files to 755 and then to 777 and neither are working.  I transferred the file through e-smith's samba share so I don't think there is a problem with binary vs. ascii transfer.  

The e-smith server is a standard and the only changes I have made to the system include .htaccess, mp3 jukebox, awstats, and disk mirroring.  Currently everything is working great except for my cgi files.  

If someone knows the problem or has any suggestions on what I should do, please adivse.  Since I am knew to linux, if I need to excute any commands, please include those in your reply.  Thanks in advance.  

{here is the test script I am trying to run}

#!/usr/bin/perl

# Create an HTML page to display a message.
print "Content-type: text/html\n\n";
print "Test";
print "
";
print "

";
print "TEST";
print "

";
print "
";
print "Hooray! It works!";
print "
";
print "
";
print "";

Lloyd Keen

Re: CGI - Internal Server Error
« Reply #1 on: September 13, 2001, 07:14:18 PM »
Trev,
Is the script in the primary or an i-bay? If it's in an i-bay there is a section in the i-bay settings to enable cgi scripting. There is also an update relating to php scripting in the primary which may have something to do with it. You can find info on the update here: http://e-smith.org/bugs/index.php3?op=showBug&bugID=27
Hope that helps
Regards Lloyd.

Trevor Wendt

Re: CGI - Internal Server Error
« Reply #2 on: September 14, 2001, 09:08:27 AM »
Lloyd, thank you for your suggestion.  I have already implemented the php scripting patch for the primary ibay, and all available updates for the e-smith server.  PHP and SSI are working fine in all my ibays.  I have tested the cgi script's in both the primary ibay cgi-bin and a couple of my other ibay cgi-bin's as well.  I have all the ibay's set to enable dynamic content and I am still receiving the 500 Internal Server Error, The server encountered an internal error or misconfiguration etc...   even after chmod 'ing the files to 755 and 777.  

Any other ideas?  I am open to suggestions and I would love to get this issue resolved soon.  Thanks for the help.

Pete the Feet

Re: CGI - Internal Server Error
« Reply #3 on: September 23, 2001, 02:28:37 PM »
Did you manage to resolve this Trevor?

I have the same prob.

Trevor Wendt

Re: CGI - Internal Server Error
« Reply #4 on: September 24, 2001, 07:01:20 AM »
Unfortunately, Lloyd has been the only person to offer any suggestions on this issue, and as of now, I have not been able to find a fix.  I was able to test the script above, on two other e-smith boxes.  One has little to no modifications and the other is a fresh install with the most recent security and bug fixes installed.  The script was tried in both the primary and an additional ibay on both the boxes.  All ibays were set for execution of dynamic content and the script was chmod 'ed to 777 for complete access.  If I am able to find a solution, I will post it here. If any one else has suggestions on how to fix the problem, let us know.  Thanks.

Trevor Wendt

Re: CGI - Internal Server Error
« Reply #5 on: September 24, 2001, 07:01:26 AM »
Unfortunately, Lloyd has been the only person to offer any suggestions on this issue, and as of now, I have not been able to find a fix.  I was able to test the script above, on two other e-smith boxes.  One has little to no modifications and the other is a fresh install with the most recent security and bug fixes installed.  The script was tried in both the primary and an additional ibay on both the boxes.  All ibays were set for execution of dynamic content and the script was chmod 'ed to 777 for complete access.  If I am able to find a solution, I will post it here. If any one else has suggestions on how to fix the problem, let us know.  Thanks.

Colin Sachs

Re: CGI - Internal Server Error
« Reply #6 on: September 27, 2001, 09:07:23 AM »
I'm having the same problem with the internal server error.  I assumed that I failed to chmod or chown appropriately for the scripts I installed, but double-checked and they seem to be the same as settings for the e-smith-manager script.  I'm not trying to run scripts in any i-bay I set-up as yet, only in the primary directory.

It may be that my headers for the scripts are not correct for the way the server is configured.  I need to:

- check the path for #!/usr/bin/perl in the scripts to make sure it matches the path for the server.  The script I'm trying is a pre-made cgi from somewhere else and I suspect this is my problem.

It it turns out my scripts are correct, then I may have some other problem.  I've been looking for references on the Apache.org website for server configuration issues, though most of the problems mentioned concerning cgi's and "500" errors are due to malformed scripting statements.




-

Colin Sachs

Re: CGI - Internal Server Error
« Reply #7 on: September 28, 2001, 01:04:10 AM »
Turns out my problems were due to a malformed upload of the scripts whereby innappropriate formatting was inserted in the script.