Yii: Exception Error not rendering view nor layout outside an action

Because there are certain validations need to be done before an action is run, a new controller component is added to do such validations to avoid repeating codes. However, the page is not displayed properly as per error view file if there is exception error. eg, if done in an action function in controller/DefaultController.php, this…

Continue Reading »

PHP: Display errors

For security reasons, display_errors should be turned off in php.ini. This will not display the error on the browser. However it’s inconvenient during development not being able to see the error and have to access error logs. This can be turned on with this code: This code should be removed / commented when put in…

Continue Reading »