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
Solved

500 server error

Posted on 1998-10-11
1
148 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
scripting, exchange 35 56
Batch File to find and replace a string 15 116
Sums of coloumns in html/java 15 80
powershell md/mkdir/New-item   -Quiet 10 96
In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
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.
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.
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 …

860 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