I would like to add some environment variables in apache xampp in windows. I already tried the following : adding this in httpd.conf
SetEnv ENVIRONMENT "setting"
or, run this script
putenv("ENVIRONMENT='setting'");
but that doesn't seem to work when I echo phpinfo(), there isn't ENVIRONMENT variable in the environment section
I know this is an old post and the OP already may has solved this by himself but for others:
SetEnv ENVIRONMENT setting
This would be the correct Syntax inside of the httpd.conf file. Also, this code should be put at the end of the file.
After saving httpd.conf the apache server needs to be restarted. Otherwise the environment variable will not be set in "this" apache session!
Sincerely, Kami Yang
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With