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

Altera_Forum
Honored Contributor II
1,058 Views

hi, 

 

i 've read that the httpserver within Ecos supports CGI.  

How to use CGI in httpserver?  

In other webserver with CGI support the executeable cgi file has to be located in a directory like cyg-bin. How about the one within ecos? 

 

Thnx
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
317 Views

Documentation on how to use the eCos web server can be found in eCos reference manual. This is installed along with the rest of eCos. Alternatively, you can find a copy here (http://ecos.sourceware.org/docs-latest/ref/net-httpd-chapter.html). 

 

The section "Server Organisation" explains how to associate a function with a filename within the server. Subsequent sections explain how you can generate HTML content. This is not strictly CGI, but it achieves the same thing.
0 Kudos
Altera_Forum
Honored Contributor II
317 Views

Thnx monkeyboy

0 Kudos
Altera_Forum
Honored Contributor II
317 Views

hi monkeyboy, 

 

i've tried to read some enviroment variables. The function i used is: 

 

char *content; 

 

content = getenv(CONTENT_TYPE); 

content = getenv(REMOTE_HOST); 

... 

 

 

it seems that i cannot read the enviroment variables. Does the webserver within ecos support full CGI scripting? 

 

Thnx
0 Kudos
Altera_Forum
Honored Contributor II
317 Views

From your other posts, I guess you've already worked this out, but the eCos web server does not support CGI. However it does support dynamic content generation.

0 Kudos
Reply