Solved

500 server error

Posted on 1998-10-10
2
133 Views
Last Modified: 2013-12-25
When I execute a very simple cgi program(By submitting a form)written in c++ using personal web server, I get
500 server error. What could cause this?
0
Comment
Question by:cMan
2 Comments
 
LVL 11

Accepted Solution

by:
mouatts earned 100 total points
ID: 1829026
500 is a general catch all for server errors. The most likely causes are that you CGI crashed or it output something on stderr.

Obviously the cause of a crash is impossible to tell without the code etc. Often the easiest way to test CGIs is to run them within a script and set up all the important environment variables (eg REQUEST_METHOD, QUERY_STRING etc) prior to execution.

If you are using VC++ or Borlan C++ and similar you can set the variables up in the environment and run the CGI in debug.

Steve
0
 

Author Comment

by:cMan
ID: 1829027
For obvious reasons I like to start out with something simple,
and here it is.

#include"iostream.h"


void main()
{
      cout <<"Content-type:text/html\n\n";
      cout <<"<html>\n";
      cout <<"<head>\n";
      cout <<"<title>";
      cout <<"CGI Output";
      cout <<"</title>\n";
      cout <<"</head>\n";
      cout <<"<body>\n";
      cout <<"CGI Output\n";
      cout <<"</body>\n";
      cout <<"</html>\n";
}
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 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