Skip to content

YII_DEBUG depends on env.code #21

pythagor opened this Issue Oct 14, 2012 · 4 comments

5 participants


It's possible to add setting 'env.code' using for enabling/disabling debug depend on environment? I searched through the code but never this param not using. Thanks.


Will analyze code for a good solution

rinatio commented Nov 8, 2012

+1. There is no easy way to enable/disable YII_DEBUG ...

rmrevin commented Nov 20, 2012


Clevertech member

There's no need to specify YII_DEBUG anymore. Application is in debug mode by default. To disable debug mode you have three options:

  1. Make the file under the root of codebase called PRODUCTION_MODE.
  2. Make it so that a variable $_SERVER['PRODUCTION_MODE'] will exist and have a true-ish value.
  3. Make it so that there'll be an environment variable called PRODUCTION_MODE and have a true-ish value.

Check the common/check_prod_mode.php file for details.

@hijarian hijarian closed this Dec 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.