Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » CGI-BIN bug with Apache Server
CGI-BIN bug with Apache Server [message #28225] Tue, 24 August 2010 09:14 Go to previous message
ratah is currently offline  ratah
Messages: 107
Registered: July 2010
Experienced Member
Hello everybody,

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?

I thank you for your response

ratah
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MT again
Next Topic: Socket: SYN_SENT stalled when ipscan connections in CoWork (MT)
Goto Forum:
  


Current Time: Mon Apr 29 15:47:53 CEST 2024

Total time taken to generate the page: 0.02431 seconds