Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

BOA CGI problem hasn't been fixed

This days i try to complete the CGI function in the uClinux BOA of my 1s10 board,but no results.

And wanna achieve the ledcontrol (http://www.niosforum.com/forum/index.php?act=st&f=18&t=2185) via the cgi function on boa.

I have tried different ways.

>1:index.html //add to home/httpd folder.

follow what KEN's method, change "POST" to "GET":


<html>
<head>
 <title>CGI script test</title>
</head>
<body>
 <form method="get" action="http://202.112.147.82/cgi-bin/test.cgi">
 <input type="submit" value="ok">
</form>
</body>
</html>

>2:creat test.cgi //add to home/httpd/cgi-bin folder.

one way:

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

another way://Compile to test.exe,then add test.exe to home/httpd/cgi-bin folder.

#include <stdio.h>
void main(void)
{
printf("content-type: text/html\n");
printf("\n");
printf("the cgi script is working\n);
exit(0);
}

Unfortunately,error in IE browser: the page cannot be displayed,server inner error...

Also i browsered the concerning topic, just like the TOPIC:"How to use boa?" by sunclever.

No result to find,even i follow the same way, but no success.

Any help would be greatly appreciated!

Thank you very much!

Best regards!

Justin

12 Replies