php警告:strtotime()错误 [英] php Warning: strtotime() Error

查看:170
本文介绍了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

更改此设置后,重新启动Web服务器,警告将消失.

After changing this setting, restart your web server and the warnings should be gone.

这篇关于php警告:strtotime()错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆