Forum Discussion
Altera_Forum
Honored Contributor
21 years agoCgi error in boa
Hello everyone.
I've read all the topics about cgi scripts in boa. when i try to do a simple submit button tha will call a cgi script the server "thinks" writes: web site found, waiting for replay and then show me an error msg... but when i try to run the script directly from IE i see the text that it should return and it is working... (ony the scipt works) can someone help me...? my html file : <form method="post" Action="http://192.168.0.20/cgi-bin/test.cgi"> <input type="submit" value="ok"> </form> my cgi file:# include <stdio.h> void main(void) { printf("content-type: text/html\n"); printf("\n"); printf("the cgi script is working\n); exit(0); } my error : the page cannot be displayed cannot find server or dns server tnx alot guys Asi2 Replies
- Altera_Forum
Honored Contributor
Here's how I implemented your functionality...
<html> <head> <title>CGI script test</title> </head> <body> <form method="get" action="cgi-bin/test.cgi"> <input type="submit" value="ok"> </form>
I didn't use an actual executable so my solution is definitely slower since it's done via scripting but it does work. I also used the "get" method instead of the "post" method for the form. I'm not sure if the "post" method is properly implemented in boa for our distribution. Hope this helps.## cgi-bin/test.cgi# # ! /bin/sh echo "Content-type: text/html\n\n" echo echo "The cgi script is working\n" - Altera_Forum
Honored Contributor
tnx Ken Wong
it really helps