Yii silently crashes I receive 500 Internal Server Error when have a mistake in source code
Posted 29 May 2012 - 03:26 PM
I'm new to Yii, it's great but one thing makes me really angry. When I made a mistake, which is not syntax error or null reference (e.g. I use function that does not exist) - the Yii just stops. If it's in view script - its trackable, because I can see where HTML stops rendering. But when it comes to controller or model - I receive 500 Internal Server Error.
I generated application with yiic command. I have the YII_DEBUG set to true and the YII_TRACE_LEVEL to 3.
How to fix this?
Posted 30 May 2012 - 02:15 AM
I get the pretty debug for these errors on both localhost and my hosting (code in actionIndex in the SiteController):
I get 500 Internal Server Error on hosting and pure PHP error on localhost, when:
- do the syntax error (e.g. forget ";")
- call to undefined function (e.g. undefinedFunction())
I actually solved this problem with
error_reporting(E_ALL); ini_set('display_errors', 'On');
in my index.php, but I only receive a pure PHP error in both localhost and hosting. Is this normal?
Posted 24 September 2013 - 03:21 AM