View previous topic :: View next topic |
Author |
Message |
gman -
Joined: 10 Dec 2002 Posts: 3
|
Posted: Tue Jul 29, 2003 12:12 am Post subject: C++ as .exe problem |
|
|
i'm trying to run a simple program:
Code: | #include <stdio.h>
int main()
{
printf("testing...");
return 0;
} |
But it comes up with an Internal server error. Do I need to install something? Or how am I supposed to run a C++ file compiled as a .exe? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jul 29, 2003 3:55 pm Post subject: Re: C++ as .exe problem |
|
|
Your program is not conforming to the CGI specification (http://hoohoo.ncsa.uiuc.edu/cgi/interface.html). To fix it, you should output at least some CGI headers:
Code: |
#include <stdio.h>
int main()
{
printf("Status: 200 OK\n"); // Status CGI header
printf("\n"); //End of CGI headers
printf("testing...");
return 0;
} |
If you are programming CGI executable in C or C++, we recommend using a CGI library that manage all the CGI tasks for you (CGIC from http://www.boutell.com/cgic is a good choice). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
gman -
Joined: 10 Dec 2002 Posts: 3
|
Posted: Tue Jul 29, 2003 5:31 pm Post subject: |
|
|
cool. Thanks. I'll be sure to check that website out :wink: |
|
Back to top |
|
|
|