php warning date(),lnmp打开cacti时提示PHP Warning: date()
配置完lnmp后,配置cacti,打開時發現,顯示網頁,手動運行???/usr/local/php/bin/php ?/usr/local/nginx/html/cacti/poller.php ?--force時提示
PHP 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 ‘Asia/Chongqing‘ for ‘CST/8.0/no DST‘ instead in /opt/nginx/html/cacti/cmd.php on line 61
這個提示是php.ini沒有配置好時區,這時可以在php.ini里設置date.timezone= PRC或者date.timezone=Asia/Chongqing,然后重啟php-fpm,但要確定你的php.ini是編譯時安裝指定的配置文件,如果不是,相當于白忙一場,之前在用cacti-plugin-0.8.7h的時候,在登陸頁面輸入密碼后跳轉到cacti/install/index.php后,頁面是空白的,可能是版本有問題,換新版本后cacti-spine-0.8.8b,卻是有上面的提示,修改php.ini配置文件后還是無法搞定,打開cacti后發現,console可以顯示,但graphs卻出不了圖,顯示都是提示類似上面的東西,打開include/global_constants.php,在非php注釋的行最前面添加一行include/global_constants.php,這時就可以正常出圖了
原文:http://www.cnblogs.com/2myroad/p/3849155.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的php warning date(),lnmp打开cacti时提示PHP Warning: date()的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 寻找唯一特等奖java,大工斩获唯一特等
- 下一篇: win7php网页显示空白,win7系统