Yii Framework Forum: Php Settings + Disable Display Of Php Warnings - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Php Settings + Disable Display Of Php Warnings Rate Topic: -----

#1 User is offline   Michael James Watson 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 20-December 12

Posted 20 December 2012 - 08:18 AM

Hi,

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.

Regards,
Michael
0

#2 User is offline   yiqing95 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 586
  • Joined: 27-December 10
  • Location:china

Posted 20 December 2012 - 08:41 AM

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 )
0

#3 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,336
  • Joined: 12-October 09
  • Location:Croatia

Posted 20 December 2012 - 09:03 AM

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...
Find more about me.... btw. Do you know your WAN IP?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users