Search code examples
phpdebuggingyiiframeworks

Yii - 'white screen of death', debugging tips


I have a staging server running a Yii application that now gives a 'white screen of death'. I cannot see anything being ouputted to the screen (or even the source code when 'view source'), locally the same code runs without any issues.

Can anyone suggest a good routine to debug 'white screen of death' within a Yii application?


Solution

  • Getting a blank screen in yii is mostly because error_reporting is off. Put

    error_reporting(-1);
    ini_set('display_errors', true);
    

    in index.php should get your output back.

    Note that you can always look in application.log and apaches error.log for informations when you don't have some output.