Re: Once more environment variables
Stanley Gambarin (gambarin@openmarket.com)
Fri, 01 Nov 1996 19:21:10 -0500
Message-Id: <199611020021.TAA07332@u4-138.openmarket.com>
To: Yan Dolyar <yan@jts.com>
Subject: Re: Once more environment variables
In-Reply-To: Your message of "Tue, 29 Oct 1996 17:24:19 EST."
<1.5.4.32.19961029222419.008d3b54@jts>
Date: Fri, 01 Nov 1996 19:21:10 -0500
From: Stanley Gambarin <gambarin@openmarket.com>
>[Stuff deleted]
> - to set up environment variables (that my application
> needs to access SYBASE) through putenv() calls just after
> FCFI_Accept() (at the beginning of while loop) - this doesn't
> work.
>
> Does someone has any ideas?
>
> Yan Dolyar
>
Since FastCGI is design to multiplex I/O and use one
channel for stdin, stdout and stderr, you can not use any
operations that manipulate these streams on the low level. One
example is the putenv() function, and that is the cause of
"loosing" environment variables. The correct way to pass the
environment variables to the FastCGI application is to use
the -initial-env option of the AppClass directive.
--
*******************************************************************************
* Stanley Gambarin Open Market Inc. *
* FastCGI (soon-to-be) Guru 245 First St. Cambridge MA 02142 *
* (617) - 374 - 6565 *
* mailto://gambarin@openmarket.com *
* http://acs2.bu.edu:8001/~stanleyg (school) *
* mailto://stanleyg@cs.bu.edu *
*******************************************************************************