OSSEC安装结束后运行,运行以下命令却抛错

cat /opt/ossec/logs/alerts/alerts.log

具体抛错内容:

** Alert 1468897672.2164786: mail  - syslog,errors,
Jul :: localhost->/var/log/httpd/error_log
Rule: (level ) -> 'Unknown problem somewhere in the system.'
[Tue Jul ::50.911154 ] [:error] [pid ] [client 192.168.129.1:] 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/html/analogi/detail.php on line 547, referer: http://192.168.129.128/analogi/

It is not safe to rely on the system解决方法,其实就是时区设置不正确造成的,
解决方法就是在/etc/php.ini里加上找到date.timezone项,

设置date.timezone = "Asia/Shanghai",重启环境就ok了。

PHP Warning: date(): It is not safe to rely on the system's timezone settings.的更多相关文章

  1. Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use ...报错

    错误截图 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* t ...

  2. 出现Warning: date(): It is not safe to rely on the system's timezone settings的解决办法

    在没有配置,尤其是新安装的PHP中使用date函数时,会报这个错误: Warning: date(): It is not safe to rely on the system's timezone ...

  3. Warning: strftime(): It is not safe to rely on the system's timezone settings.

    当运行程序时,会出现如下警告: Warning: strftime(): It is not safe to rely on the system's timezone settings. You a ...

  4. php : Warning: strftime(): It is not safe to rely on the system's timezone settings.

    使用 Smarty 的时候出现这种警告: Warning: strftime(): It is not safe to rely on the system's timezone settings. ...

  5. php时区设置 warning: strtotime(): It is not safe to rely on the system's timezone settings

    warning: strtotime(): It is not safe to rely on the system's timezone settings warning: strtotime(): ...

  6. date(): It is not safe to rely on the system’s timezone settings.

    在执行php脚本时出现的错误: date(): It is not safe to rely on the system’s timezone settings.You are *required* ...

  7. PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.

    有三种解决办法: 1. php文件中设置时区 <?php date_default_timezone_set('Asia/Shanghai'); echo strtotime('2012-9-3 ...

  8. yii2定时任务不执行,报错PHP date调用警告:It is not safe to rely on the system's timezone settings

    It is not safe to rely on the system's timezone settings 在写php程序中有时会出现这样的警告:PHP Warning: date(): It ...

  9. 解决php的“It is not safe to rely on the system’s timezone settings”问题

    PHP调试的时候出现了警告: It is not safe to rely on the system解决方法,其实就是时区设置不正确造成的,本文提供了3种方法来解决这个问题. 实 际上,从PHP 5 ...

随机推荐

  1. IE下无法保存Cookie和Session问题

    最近在做新的Web项目时,因为一个验证码无法保存在Cookie中,或者更确切地说是IE下无法保存Cookie的问题纠结了整整一天时间,考虑了多种原因,单步调试了不下三十次,也没有结果.甚至在无奈之下改 ...

  2. 二,WPF的布局

    所有WPF布局窗口都派生自System.WIndows.Controls.Panel抽象类的面板. 不能在布局容器中放置字符串内容,而是需要一个继承自UIElement的类对字符串进行包装,如Text ...

  3. Eclipse下jad反编译之“类文件查看器”不能处理给定的输入错误解决

    Eclipse中的插件下载,安装和配置可以参考我的另一篇文章:MyEclipse反编译Class文件 下面重点讲解如何使用jad反编译 1.在DOS窗口中,到class所在目录,直接运行 >ja ...

  4. 将eclipse的应用程序打包成.exe

    转自:http://blog.163.com/loveshijie_1991/blog/static/1760553112012102573437156/ 参考:http://blog.csdn.ne ...

  5. Access

    一般系统的实现: 管理系统的分析与设计 --->>数据表的设计创建 --->> 设计“查询”与“宏” --->> 创建窗体与报表 --->>系统注册 启 ...

  6. 转载 -- C# 中的委托和事件

    原文地址:http://www.tracefact.net/CSharp-Programming/Delegates-and-Events-in-CSharp.aspx C# 中的委托和事件 引言 委 ...

  7. TCP协议三次握手、四次断开 过程分析

    建立TCP连接的过程需要进行三次信息交换,通常称为“三次握手”,示意图如下:

  8. C#开源大全--汇总

    商业协作和项目管理平台-TeamLab 网络视频会议软件-VMukti 驰骋工作流程引擎-ccflow [免费]正则表达式测试工具-Regex-Tester Windows-Phone-7-SDK E ...

  9. C#如何判断两个数组相等

    /// <summary> /// 数组比较是否相等 /// </summary> /// <param name="bt1">数组1</ ...

  10. Linux下卸载和安装MySQL[rpm包]

    一.卸载原来的mysql: 卸载一: 输入: #rpm -qa | grep -i mysql 显示: mysql-libs-5.1.52-1.el6_0.1.i686 卸载方法: yum -y re ...