0

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?

Igor Shalyminov
  • 694
  • 2
  • 8
  • 22

1 Answers1

2

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.

Igor Shalyminov
  • 694
  • 2
  • 8
  • 22