Solved

500 server error

Posted on 1998-10-10
2
132 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

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

Title # Comments Views Activity
Studying Angular for employability 5 86
scripting, exchange 35 51
Batch File to find and replace a string 15 111
ROBOFTP UNZIP 1 41
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…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

776 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