Forum

Running CGI programs

IanL
17 July 2010, 17:34
Hi,

I'm trying to run a straight C compiled cgi program. It runs okay but the url isn't broken down as command line arguments and
made available to main. So in httpd://file.cgi?A=B, A=B doesn't appear in main(int argc, char **argv)

I guess this is because I'm not using CGI Handler but I can't figure out which one to use for a binary file.

Thanks.

Hiawatha version: Hiawatha v6.17.1, cache, IPv6, SSL, URL toolkit, XSLT
Operating System: Puppy 5.01
Hugo Leisink
17 July 2010, 18:11
That's true. URL parameters are passed through to the CGI application via environment variables. Look at the QUERY_STRING variable.

A nice library for creating CGI applications in C is cgic [www.boutell.com].
IanL
17 July 2010, 18:40
Thanks. I'll take a look at it.
This topic has been closed.