zoukankan      html  css  js  c++  java
  • 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注释的行最前面添加一行date_default_timezone_set(‘PRC’);,这时就可以正常出图了

  • 相关阅读:
    非常有助于理解二极管PN结原理的资料
    5个CSS3技术实现设计增强
    如何读懂Web服务的系统架构图
    网页布局WEB标准的HTML结构化
    网站内容排版可用性分析
    用CSS做导航菜单的4个理由
    提高网站设计可用性(有效性)的10条原则
    dl,dt,dd标签 VS 传统table实现数据列表
    一些CSS3新技术
    21个CSS技巧
  • 原文地址:https://www.cnblogs.com/2myroad/p/3849155.html
Copyright © 2011-2022 走看看