문제

I have a FastCGI application that loads and processes a lot of data during its startup. And I want it to get some environment variable to determine its input data path, but as much as I understand so far, environment pointer envp comes with the request.

I want to do getenv before the very first request, say directly after FCGX_Init(). Is it possible?

도움이 되었습니까?

해결책

Yeah, as it turnes out, the lighttpd's counterpart to -initial-env is "bin-environment" array in the fastcgi.server section of lighttpd.conf. The values defined there are accessible for getenv() from the very beginning of execution.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top