PHP Warning: date(): It is not safe to rely on the system's timezone settings.
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.的更多相关文章
- 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 ...
- 出现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 ...
- 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 ...
- 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. ...
- 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(): ...
- 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* ...
- 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 ...
- 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 ...
- 解决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 ...
随机推荐
- SQL的自增列如何重置
第一种方法:首先去除该列自增的标识,然后再修改id的值,成功修改后,再加上自增标识:如果不修改自增标识,会报错:“无法更新标识列”. 第二种方法:删除该自增列,而后重建一个自增列.
- JVM基础:深入学习JVM堆与JVM栈
转自:http://developer.51cto.com/art/201009/227812.htm JVM栈解决程序的运行问题,即程序如何执行,或者说如何处理数据;JVM堆解决的是数据存储的问题, ...
- iOS/Objective-C开发 字典NSDictionary的深复制(使用category)
目标:把NSDictionary对象转换成NSMutableDictionary对象,对象内容是字符串数组,需要实现完全复制(深复制). 如果调用NSDictionary的mutableCopy方法, ...
- (C学习基础)一,CMD的使用
以后考研要考数据结构,所以系统的整理一下C学习笔记.这里开发用VS2013 CMD资料在这里下载 首先就是DOS系统的CMD的使用,是不是觉得会命令行语句的人特别牛呢,有时候使用命令行总是事半功倍, ...
- 【学习总结】声明变量在@interface括号中与使用@property的区别
方式一:直接在.h文件@interface中的大括号中声明. @interface Test : NSObject { NSString *str; // 私有变量 , 其他类无法访问,只能够该类内部 ...
- Notes of the scrum meeting(11/1)
meeting time:9:00~10:30p.m.,November 1st,2013 meeting place:20号公寓楼前 attendees: 顾育豪 ...
- Ubuntu12.04更新源地址列表
1. 修改更新源 sudo gedit /etc/apt/sources.list 2. 比较全的更新源列表中一般都包含deb和对应的deb-src. deb和对应的deb-src一般都包含preci ...
- iOS 10的23个隐藏新特性-b
上周iOS 10正式版推送后,24小时的更新率已经超过15%,实在惊人.虽然有着初期变砖.5S6卡顿.移动VoLTE无法使用.美版无信号等BUG,但不可忽视的是,iOS 10还是带来了很多从前没有的功 ...
- 编译dubbo2.5.4时遇到的问题及解决
dubbo的官方git地址为:https://github.com/alibaba/dubbo 按照其流程进行下载及编译,遇到的问题为: 1. 执行 mvn clean install -Dmaven ...
- FMS (端口问题)如何穿透防火墙
转自http://www.cnblogs.com/zhchongyao/archive/2010/01/22/1653803.html 先是管理端口,就是fms2_console文件连接到server ...