C++ as .exe problem

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
gman
-


Joined: 10 Dec 2002
Posts: 3

PostPosted: Tue Jul 29, 2003 12:12 am    Post subject: C++ as .exe problem Reply with quote

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 View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jul 29, 2003 3:55 pm    Post subject: Re: C++ as .exe problem Reply with quote

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 View user's profile Send private message Send e-mail
gman
-


Joined: 10 Dec 2002
Posts: 3

PostPosted: Tue Jul 29, 2003 5:31 pm    Post subject: Reply with quote

cool. Thanks. I'll be sure to check that website out :wink:
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group