stack trace not always showing


I’m not sure if this a Yii or PHP issue, so sorry if I’m posting this in the wrong place…

Since a while, my yii dev setup is not showing traces for some messages. Instead, it just displays the error without any additional information. For example, I just got this error:

Object of class Pic could not be converted to string

(that’s it - no file/line information or formatting). It was a simple typo in a variable name. But without file+line info took me ages to find.

As I said, this only happens sometimes. Mostly I get something like this:

I have the feeling this is linked to the level of errors. Notices and Warnings seem to be displayed correctly. The fatal error above, isn’t. But as the error level is not displayed in the first version, I can’t be sure.

I have a hunch this may have happened when I updated PHP - but I’m not sure either.

My setup

  • Apache 2.4.10, php5.6.9 on debian 8.1

  • Yii 1.1.17

  • error_reporting set to

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

  • xdebug with the following options





  • in index.php I have

defined('YII_DEBUG') or define('YII_DEBUG',true);

// specify how many levels of call stack should be shown in each log message

defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

  • in config.php I have






					'levels'=>'error, warning',


				// uncomment the following to show log messages on web pages



					'enabled' => YII_DEBUG,




Do you have any suggestions where else I could look ?

I had similar issues, and the problem was in CSS. Basically, existing CSS on my page was hiding my error message and everything else. Right click on your error (or blank screen), and click "View page source". In a page source try to fond your stack trace.