Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get this running,

SetEnvIf Host ^www\. HOST_PRODUCTION


    # e.g. php_flag display_errors on 



    # e.g. php_flag display_errors off


but it doesn't work. any ideas?

share|improve this question
up vote 1 down vote accepted

<IfDefine> only runs when apache starts. The HOST_* variables should be available in your PHP script, so you can check $_ENV['HOST_PRODUCTION'] and turn display_errors off at run time.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.