PDA

View Full Version : Creating CGI Files Using VC++ 5.0


Nikolai459
08-04-2005, 03:14 PM
Hello All,

I am trying to creat cgi files using VC++ 5.0. I know using perl is a more common method but for my project I need to create these using VC++. I am kinda going off what a previous employee did so I at least have a reference, but I'm still unable to figure out how to create a cgi file from VC. Any suggestions would be great, thanks!

Jeff Mott
08-04-2005, 07:24 PM
The only suggestion I can give you with such a vague question is to use the CGIC (http://www.boutell.com/cgic/) library.

Nikolai459
08-04-2005, 08:27 PM
Here's what I've done, and what I'm trying to do. I'm using Apache 2.0.54 and it is up and running. The guy before me has about 10 cgi files buried within the Apache Folder (Program Files/Apache Group/Apache2/Cgi-Bin/filename.cgi).

I know that he compiled them using something other than perl because we dont' have it. Also I found the exact same file names as the cgi files, only these are written in C.

I've tried writting a simple "hello world" program in C and changing the extension to .cgi and putting it into the cgi-bin with the rest of the cgi files but that gives me an "internal server error".

To be more specific, how can I compile a .cgi file in C and put it into the cgi-bin and make this work?

Nikolai459
08-04-2005, 09:04 PM
Ok finally figured it out,

when you compile and build your files in C++ it gives you an exectuable file. To get this to work the cgi-bin, you have to change the extension on that exe file to cgi. Once you've done this, it works like a charm.

Appreciate your help Jeff.