Koozali.org: home of the SME Server

500 internal server error/perl cgi

Jeff Nelson

500 internal server error/perl cgi
« on: October 23, 1999, 03:24:04 AM »
Hi all,

I just added a perl script to my cgi-bin under Primary and set the permissions using chmod.  

Now when I call it with my browser I get "500 internal server error."  I have looked up this error and find that it is the result of a server misconfiguration.  

Has anybody else experienced this error and/or have some idea of how to fix it?  

Thanks a lot!

By the way, the server is working GREAT!  

Jeff Nelson

Joseph Morrison

RE: 500 internal server error/perl cgi
« Reply #1 on: October 24, 1999, 04:36:04 AM »
Hi Jeff,

> Now when I call it with my browser I get "500 internal
> server error."  I have looked up this error and find that
> it is the result of a server misconfiguration.

Are you sure the CGI script is correct? Have you tried running it from the shell on the e-smith server? It should prompt you to enter name=value pairs, then dump out the appropriate HTML. The "internal server error" message could mean that the CGI script is generating an error.

> By the way, the server is working GREAT!

Glad to hear it!!
- Joe Morrison

Jeff Nelson

problem solved
« Reply #2 on: October 27, 1999, 02:21:35 AM »
After some poking around in the other perl scripts on the e-smith server, I found that the rest of them all had -wT on the end of the #! command line.  So I put it on my script and --voila!-- no more 500 internal server error.  Problem solved.  

Hope that helps somebody else.  

Jeff

Jeff Nelson

RE: problem solved
« Reply #3 on: November 21, 1999, 11:47:46 PM »
Having had several more weeks to work on this server, I found some more complications:  if I edit the cgi files from the local network on a Windows client machine (using a text editor such as Notepad Plus), immediately thereafter, the server returns a 500 error, no matter what the #! line says.  

The error doesn't happen if I telnet in (as root) to edit the files using pico.  

The problem log gives a message such as "file busy-locked".  (Sorry, I don't have the exact wording because I'm in a different city now!)

Could there be something funny going on with samba?  

Best regards,

Jeff Nelson