Solved

500 server error

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Script refinement question. 1 32
Powershell File Sort 8 45
Perl script to process a .csv file 18 64
size of file 1 24
This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

749 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