Solved

500 server error

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now