Apache fastcgi issue

Saikat Kanjilal <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <[email protected]>
Hello Folks:
I'm using Apache and fastcgi to develop a server side static fastcgi C application.  What I would like to do is to pass in 3 different values (delineating different unix filepaths and directories) to the fastcgi application when it starts up.  I've read the mod_fastcgi docs in detail and they specify the following:


                -initial-env name[=[value]] (none)
            
                A name-value pair to be passed in the FastCGI application's initial environment. To pass a
                variable from Apache's environment, don't provide the "=" (if the variable isn't
                actually in the environment, it will be defined without a value). To define a variable without a value,
                provide the "=" without any value. The option can be used repeatedly.
            
So after reading the above I added the following in my httpd.conf file:

FastCgiServer /path/to/my/fastcgiapp -initial-env 'clientconfigfile=/path/to/my/config'


My application starts up fine but when I try to use getenv("clientconfigfile") or FCGX_GetParam("clientconfigfile",env) to try to access the contents of the environment variable passed in neither seem to work.


So I then tried to remove the equals sign inside my httpd.conf like the following:
FastCgiServer /path/to/my/fastcgiapp -initial-env 'clientconfigfile /path/to/my/config'

My fastcgi application didnt start at all in the above case, if someone has used the above argument can they provide some examples on how to get that working for a static Fastcgi application, and more importantly how to then access the contents of that environment variable inside the C code.


Thanks very much for your help.
SK






_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.