PHP Warning:
strtotime(): 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /var/www/cacti/index.PHP
查了一些资料,说是PHP版本太高,在新版本中必须指定timezone之类的。
1、在PHP配置文件中添加timezone的配置
(参照debian的配置规则,添加小的配置规则文件即可,好维护,自定义性好)~# vim /etc/PHP/cli-PHP5.3/ext-active/date_timezone.ini
date.timezone = "Asia/Shanghai"
~ # env-update
~ # source /etc/profile
自定义的文件放在cli-PHP5.3/ext-active目录中,是因为PHP默认是采用cli方式,另外ext-active目录是表示启用特性的专用目录,这个可以从/etc/env.d/20PHP5.3文件中看出来
MANPATH="/usr/lib/PHP5.3/man/"
CONFIG_PROTECT_MASK="/etc/PHP/cli-PHP5.3/ext-active/ /etc/PHP/cgi-PHP5.3/ext-active/ /etc/PHP/apache2-PHP5.3/ext-active/"