php Warning: strtotime() Error(php 警告:strtotime() 错误)
问题描述
我已将我的 joomla 和 wordpress 文件从旧服务器更改为新服务器.在前端和管理端,它的工作没有任何错误.但是在数据库(phpmyadmin)部分它显示了一些这样的警告消息..
I have changed my joomla and wordpress files from old server to new server. In the front end and admin side its working without any errors. But in the Database (phpmyadmin) Section it shows some warning messages like this..
Warning: strtotime() [function.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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 88
Warning: strftime() [function.strftime]: 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/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483
您能否建议如何隐藏这些警告消息??
Can you please suggest, how to hide these warning messages??
提前致谢.
推荐答案
你真的只是想隐藏错误信息还是你想解决问题,他们正在指示?
Do you really just want to hide the error message or do you want to solve the problem, they're indicating?
在您的新服务器上,您应该会发现 php.ini
文件中的设置 date.timezone
被注释掉了.在这里,您必须指定您的服务器所在的时区.例如,我的服务器位于德国,所以我在这里使用 Europe/Berlin
:
On your new server, you should find a setting date.timezone
in your php.ini
file commented out. Here, you have to specify the timezone your server is located in. For instance, my server is located in Germany, so I use Europe/Berlin
here:
date.timezone = Europe/Berlin
您可以在此处找到受支持时区的完整列表:
You find a complete list of supported timezones here:
http://www.php.net/manual/en/timezones.php
更改此设置后,重新启动您的网络服务器,警告应该消失了.
After changing this setting, restart your web server and the warnings should be gone.
这篇关于php 警告:strtotime() 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:php 警告:strtotime() 错误
基础教程推荐
- Doctrine 2 - 在多对多关系中记录更改 2022-01-01
- 使用 PDO 转义列名 2021-01-01
- 如何在 Symfony 和 Doctrine 中实现多对多和一对多? 2022-01-01
- 在 CakePHP 2.0 中使用 Html Helper 时未定义的变量 2021-01-01
- 如何在 XAMPP 上启用 mysqli? 2021-01-01
- PHP 守护进程/worker 环境 2022-01-01
- 在 yii2 中迁移时出现异常“找不到驱动程序" 2022-01-01
- phpmyadmin 错误“#1062 - 密钥 1 的重复条目‘1’" 2022-01-01
- 找不到类“AppHttpControllersDB",我也无法使用新模型 2022-01-01
- HTTP 与 FTP 上传 2021-01-01