cgi using C++ Builder

Information and hep with Lil HTTP Server

cgi using C++ Builder

Postby RBostic » Thu Jun 26, 2003 5:27 pm

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]

Site Admin
User avatar
Posts: 2460
Joined: Wed Apr 16, 2003 4:35 pm
Location: Western PA

Postby Scott » Fri Jun 27, 2003 8:11 am

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.


Return to Lil HTTP Server

Who is online

Users browsing this forum: No registered users and 2 guests