I experiment with CGI-BIN application into Apache Web Server and have a problem.
Here is my code
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
String ss = "";
ss += "Content-type: text/html";
ss += "<html><head><title>Hello!</title></head><body>";
ss += "Hi man! See my C++ CGI app?!";
ss += "<h1>Good!</h1>";
ss += "</body>";
Cout() << ss;
}
The bug message is:
Quote:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, contact@domaine.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site's server but the server could not be more specific on what the exact problem is.
-----------
I do the same code in Standard C :
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
cout << "Content-type: text/html" << endl << endl << endl;
cout << "<html><head><title>Hello!</title></head><body>" << endl
<< "Hi man! See my C++ CGI app?!" << endl
<< "<h1>Good!</h1>" << endl
<< "</body>";
return 0;
}
It works!
What's wrong in u++ code???
Do the function Cout() is not correct?