Solved

500 server error

Posted on 1998-10-11
1
153 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?
Here's my code.
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
Comment
Question by:cMan
[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
1 Comment
 
LVL 7

Accepted Solution

by:
faster earned 100 total points
ID: 1829030
This is not a problem of your program, but your configuration.  First you check whether the cgi has execute permission, second you check whether this directory is a cgi directory or whether the extension is correct (this depends on the server).  You should also check you server log file, it will tell you why it fails.

BTW, you miss a space:

cout <<"Content-type: text/html\n\n";
0

Featured Post

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

690 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