環境: LAMP
php解析正常, 將cacti的目錄解壓並放到/usr/local/apache/htdocs/cacti以後, 導入cacti.sql到mysql的cacti數據庫, 瀏覽器輸入網址: http:/ip/cacti, 出現如下錯誤:
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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /usr/local/apache/htdocs/cacti/include/global_constants.php
on line
Google搜索到, 在出現問題的php裏面, 添加如下項: 如/usr/local/apache/htdocs/cacti/include/global_constants.php
if( ! ini_get('date.timezone') )
{
date_default_timezone_set('Asia/Chongqing');
}
有說在php.ini裏面, 修改date.timezone = "Asia/chongqing", 但實際中並沒起到作用, 因此可以試試上述的方法.