tags:

views:

42

answers:

1

I have fastcgi installed and running. I downloaded a developerkit from fastcgi.com. It had some examples in it. One of the example files echos some stuff. It required a .libs and a .deps I put those folders along with a echo.fcgi file and into the webroot/cgi-bin. If I got to the echo.fcgi url, it works great.

I created a simple c file that prints hello world. I compile it using

gcc -Wall -o main  -lfcgi  main.c

What do I do with it now? Does it require something like a perl script or php script to be executed. Or, should I just be able to put it in the webroot/cgi-bin folder and go to it's url?

A: 

so you wrote your own server to the fcgi standard?

helpful start: http://httpd.apache.org/mod_fcgid/

reasonable example installed in conf.d/mod_fcgid.conf

would guess you want to use FastCgiServer

or if you wanted to let the default fcgi server handle connections etc... FCGIWrapper

hope that helps.

chaosless
no i just enabled the apache mod on my macbook. I think i figured it out. I needed to create a FCGIWrapper file and that file executes my compiled object file... Does that sound right?
joels
i've a shell that gets handed the page to which i've made my shell the handler. my shell is linked with -lfcgi and it is specified using FCGIWrapper. thus far it is getting handed the 'script' - which i get by: FGCI_Accept(); /* this changes the char **environ pointer */ char *script = getenv("SCRIPT_FILENAME");haven't tried running my shell without any input and reading back from the browser client - not yet anyway.
chaosless
also here is description of using the echo server provided in the fastcgi dev kit - seems like what you're wanting to do?http://www.fastcgi.com/om_archive/servers/apache/apache-fastcgi/mod_fastcgi.html
chaosless