0

In my application I am trying to set the env variabel in the httpd-vhost config instead of insde .htacces file. If I put the setEnv variabel inside the .htaccess variable it works fine but not handy to keep .htaccess sync with production. I've tried as can be seen in my screenshot to set it inside the httpd config. I've restarted apache to load the new configuration.

enter image description here

Any advice or tips are welcome and thanks in advance.

When I set the setEnv variabel outside the it seems to work?

directory
  • 3,093
  • 8
  • 45
  • 85
  • 1
    This works for me and populates `$_SERVER["APPLICATION_ENV"]` in PHP code. – anubhava Jan 11 '16 at 09:16
  • I think it's not an application related issue. when I define the $_SERVER var to get the application env it doesn't work, index isn't defined. If I add the setEnv var to my .htaccess, both work fine. (getenv('APPLICATION_ENV') in my case) – directory Jan 11 '16 at 09:20
  • Possible duplicate of [How to use the setEnv variable in apache?](https://stackoverflow.com/questions/3638637/how-to-use-the-setenv-variable-in-apache) – aaron Nov 10 '17 at 17:18

0 Answers0