-
CGI in C
Hi, I just uploaded the following file to my webserver:
http://www.packetst0rm.org/~dune/cgi-bin/sayhi.cgi
When I try to start the file my IE only shows the source...
Can anyone tell me why this happens?
I wrote the script in MSVC++6 and just saved it as *.cgi without
any compiling or such. Is this the right way or have I forgot something?
Either the directory 'cgi-bin' and the file itself have CHMOD 777.
Thanks for help! :)
-
cgi in C is compiled applications
-
Really? Someone told me that I just have to upload the *.cgi :)
I will ask my provider what I have to do to run my CGIs there...
Thank you!
-
I know that this is a post from a very long time ago, but I am replying to clarify on this matter incase someone else does a search on this board for this exact problem or just wants to know how to do it.
You have to actually upload your .c file to the computer in which your webserver is being run on. Mainly because most development will be done on a windows based system and a compilation of your software there will not allow it to run on a unix based system (which is the most used OS when it comes to running online servers). So you upload your .c file to the computer it will be run on, and then you compile it. (Most likely through a shell account, but contact you webhost just to make sure. They can provide you with not only the account to compile it but also with the command to type in, in order to compile it incase your not familiar with these types of systems.) Then transfer the resulting executable file to your proper directory (also this command can be gotten from your webhost if your not familiar with these systems), most of the time your going into your directory (for your website) and looking for a \cgi-bin\ directory.
Hope this helps!
Tyouk
-
>> Hope this helps!
Yes, indeed! :D Thanks!