yii: exception error not rendering view nor layout outside an action

by prettyscripts on 2011-08-10 11:48:00 • Leave a comment »

phpyii

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… more »

Tags: controller, error, exception, render, view, yii

yii: set and display generic global message

by prettyscripts on 2011-03-04 14:28:00 • Leave a comment »

phpcssyii

Yii has flash messages that's stored in session variables and is available in current and next requests. For some basic understanding, please read how to work with flash messages. The 3 basic functions used:Yii::app()->user->setFlash('key', '… more »

Tags: error, flash, message, notice, yii

symfony: customize 404 error page

by prettyscripts on 2009-07-23 15:04:10 • 2 comments »

symfony

how do you replace the default brown page not found error? there are 2 ways to do it. i chose to override default template because it seems more convenient. from command line: > cd /to/your/apps/[application]/modules > mkdir default > mkdir… more »

Tags: 404, error, symfony

php: display errors

by prettyscripts on 2007-12-03 20:17:31 • Leave a comment »

php

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. this can be turned on with this code:ini_set("displa… more »

Tags: error, php