Solved

Error 500 - Server is Misconfigured?

Posted on 1998-09-23
3
401 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
ID: 1828779
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
ID: 1828780
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
ID: 1828781
#!

(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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

816 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

9 Experts available now in Live!

Get 1:1 Help Now