Php Settings + Disable Display Of Php Warnings


I’m a PHP developer, and new to yii framework.

  1. I am carrying out hosting migration of a website built in yii. Could you advise any server PHP settings that are essential in order to run yii correctly?

  2. I am receiving a PHP error warning:

“date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘UTC’ for ‘GMT/0.0/no DST’ instead”

I would like to either fix, or hide and ignore such warnings. Are there any configuration settings I can set to do this?

Many thanks. Your assistance is much appreciated.



yii framework have a ‘requirements’ dir , which can assist to check you environment if meet yii.

your problem is "date_default_timezone_set " just try in your index.php (before the ->run() function is ok !)

set your timezone (google it how use this function )

This was introduced in PHP 5.3, to solve it for all your PHP scripts you should set the timezone in your php.ini file.

This has already been discussed few times on the forum here, you can try to search for it…