cgi using C++ Builder

Information and hep with Lil HTTP Server
Post Reply
RBostic

cgi using C++ Builder

Post by RBostic »

Hello everyone, My name is Bob and I'm new to LilHTTP server and I need help! I will get powerbasic soon, but untill I do get a copy of the compliler I thought I'd try using my C++ Builder to create a cgi exe file. I did all the things that the book, I was copping from suggested and when I ran the test.html the browser wanted to copy the cgi.exe file and not exicute it.

The test.html file had a "get scripts\gci.exe" and not a "post", could this be the problem. I also tried putting the cgi.exe in the cgi-bin file and that didn't work. The test.html called for the cgi.exe file from folder called Scripts.

The example was out of a book called "Borland C++ Builder How-to" and the program cgi.exe was -precompliled. The test.html file was copied from the cd for the book.

Thank you for any help enyone can give me!

Bob [/quote]
User avatar
Scott
Site Admin
Site Admin
Posts: 2566
Joined: Wed Apr 16, 2003 5:35 pm
Location: Western PA

Post by Scott »

Hi Bob,

The CGI file itself must be located in the folder designated by the server as the CGI folder. Otherwise, the server will try to send the file to the end user (download) instead of executing it. The CGI folder in Lil' HTTP acts as though it were located on the ROOT. So you can test your CGI EXE by typing in htttp://server_address/cgi_name.exe (extra t in http inserted so bbs won't activate the link).

Once the server knows to execute the cgi instead of sending it, you should be able to continue writing your html files around it.

Scott
Post Reply