Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI Handler Problems

Status
Not open for further replies.
Feb 1, 2001
116
US
I'm running Apache 2 on a Windows 2000 Workstation with SP4. I've created a simple VB CGI program that will grab the input from the "post" and display the STDIN line in a message box just for debugging. My HTML code is simple:

<form method="post" action="/cgi-bin/test.exe">
Your Name:
<input type="text" name="name"><br>
<input type="submit" value="Submit" name="B1">
</form>

Yet, when I select the submit, nothing is ever posted to test.exe, yet if I key in " then the word "Works!" pops up in the message box.

Any idea why the data isn't posting? I thought it might be something I have configured incorrectly in Apache.

What additional information is needed?

Thanks in advanced.
 
dsullinger,

I have no experience with writing CGI scripts in VB, but I've run into similar problems with some PHP scripts.

Using the above code example, when you click submit, should it then load "/cgi-bin/test.exe?somevalue"?

This may be a question for the VB forum, as I know of no Apache configuration setting that would affect this (other than not allowing CGI execution, which is not the problem).

Wishdiak
A+, Network+, Security+, MCSA: Security 2003
 
If it reads data from the URI then I would assume it's still using the GET method somehow. If you specified that the form method is POST then it should only read from STDIN.

Try telneting into port 80 on your Apache server and execute this command:

POST /cgi-bin/test.exe HTTP/1.1 <enter>
host: yourserverhostname
content-type: application/x-content-length: 8 <enter>
<enter>
name=bob <enter>
<enter>

Let us know if you get back the expected data. Note that the response will be uninterpreted HTML code so you will see HTML tags in it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top