设置“date.timezone"在 php.ini 中设置 [英] Set the "date.timezone" setting in php.ini
问题描述
我已经在 php.ini
中设置了 date.timezone
也在 appKernal
中.还 php app/check.php
给出以下消息.
I have set date.timezone
in php.ini
also in appKernal
.
Also php app/check.php
giving following message.
(您的系统已准备好运行 Symfony2
项目)
(Your system is ready to run
Symfony2
projects)
但是当我访问 web/config.php
时,它给出了以下结果:
But when I access web/config.php
, it is giving following result:
已检测到主要问题,必须先修复,然后才能继续:在 php.ini*
中设置 date.timezone
设置(如 Europe/Paris
).
Major problems have been detected and must be fixed before continuing: Set the
date.timezone
setting inphp.ini*
(likeEurope/Paris
).
推荐答案
如果您是 Linux 用户,请在这两个文件中执行这些操作.我之前也遇到过同样的问题,并通过以下方式进行了排序:
If you're a Linux user do these in both files. I had the same issue before and sorted with:
sudo nano /etc/php5/apache2/php.ini
sudo nano /etc/php5/cli/php.ini
如下所示:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/London
就像下面指出的评论一样,也有 FPM:
Like pointed out comment below there is FPM too so:
sudo nano /etc/php5/fpm/php.ini
这篇关于设置“date.timezone"在 php.ini 中设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!