I recently changed the webserver environment on my production system to Apache2.4/mod_fcgid 2.3.9. On restarting Apache, I realized that my scripts depending on the PHP getenv()
were broken. Checking further, I could retrieve the Windows PATH with getenv("PATH")
but not several other variables set by my application installation, or even some others (e.g. PSModulePath
).
Using phpinfo()
, I cannot see these Windows env variables as they used be when I ran the PHP as apache module (mod_php
).
I have laid out other details of my httpd.conf
over at Serverfault (https://serverfault.com/questions/675736/apache-2-4-with-mod-fcgid-getenv-not-working-in-php) , where the detailed version of this question is yet unanswered.
Basically, is there a fundamental reason why php getenv()
, when running on mod_fcgid
, should retrieve only certain variables (maybe those originally installed with the operating system, I'm guessing), but ignore those subsequently set by other applications?
I've foraged google for close to 48 hours now, and found nothing tangible. Could anyone please be kind enough to assist with insights.
Thank you.