Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Cgi error in boa

Altera_Forum
Honored Contributor II
40,396 Views

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 

Asi
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
39,629 Views

Here&#39;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> 

 

## cgi-bin/test.cgi# # ! /bin/sh echo "Content-type: text/html\n\n" echo echo "The cgi script is working\n" 

 

I didn&#39;t use an actual executable so my solution is definitely slower since it&#39;s done via scripting but it does work. I also used the "get" method instead of the "post" method for the form. I&#39;m not sure if the "post" method is properly implemented in boa for our distribution. 

 

Hope this helps.
0 Kudos
Altera_Forum
Honored Contributor II
39,629 Views

tnx Ken Wong 

it really helps
0 Kudos
Reply