Solved

Error 500 - Server is Misconfigured?

Posted on 1998-09-23
3
399 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

929 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

18 Experts available now in Live!

Get 1:1 Help Now