Solved

Error 500 - Server is Misconfigured?

Posted on 1998-09-23
3
413 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Review of the nodejs code 1 60
powershell switch statement 7 48
Select SamAccountName - powershell script 2 31
Help to debug powershell script 5 58
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
The viewer will learn how to dynamically set the form action using jQuery.

710 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