Solved

Error 500 - Server is Misconfigured?

Posted on 1998-09-23
3
396 Views
Last Modified: 2013-12-25
Does anyone know what causes this Error?  
I'm running a script that executes fine from the command line (returns an error level of 0) on a linux server but when I hit it from my browser I get an Error 500 - Server is misconfigured error.  

My ISP wants to charge$$ for advice, so I'll ask here instead.  They are using a gateway called apache? (I think)  I've chmod'ed the .cgi file to 755 and the script is in the cgi-bin directory, so I'm all out of ideas...  anyone know what is going wrong with it?

Thanx in advance.
0
Comment
Question by:KirkGray
3 Comments
 
LVL 1

Accepted Solution

by:
alweiner earned 100 total points
Comment Utility
Here's how to tell (for free :)  what's happening.  Set-up a "wraparound" script

#!/bin/sh

echo "Content-type: text/plain"
echo ""
/thepath/yourscriptname

Make sure the permissions on the new script are execute.  Then, call the new script from the www.  It will show you the actual error messages generated by your script.
0
 

Author Comment

by:KirkGray
Comment Utility
Thanx Alweiner,

The line #!/bin/sh made my script work.  
Tell me what it does and I'll give you the points!
What does it do?
0
 
LVL 5

Expert Comment

by:b2pi
Comment Utility
#!

(Called shebang) on the first line of a script, indicates what program
is going to run your script, as well as some arguments.

For instance,

#!/bin/sh


indicates that the file is a bourne shell (or bash) script.

#!/usr/bin/perl -w

indicates that the file is to be run by /usr/bin/perl with the -w as a
parameter to the interpreter.


0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now