<bdo id='ogRaJ'></bdo><ul id='ogRaJ'></ul>

      <small id='ogRaJ'></small><noframes id='ogRaJ'>

    1. <tfoot id='ogRaJ'></tfoot>
      <i id='ogRaJ'><tr id='ogRaJ'><dt id='ogRaJ'><q id='ogRaJ'><span id='ogRaJ'><b id='ogRaJ'><form id='ogRaJ'><ins id='ogRaJ'></ins><ul id='ogRaJ'></ul><sub id='ogRaJ'></sub></form><legend id='ogRaJ'></legend><bdo id='ogRaJ'><pre id='ogRaJ'><center id='ogRaJ'></center></pre></bdo></b><th id='ogRaJ'></th></span></q></dt></tr></i><div id='ogRaJ'><tfoot id='ogRaJ'></tfoot><dl id='ogRaJ'><fieldset id='ogRaJ'></fieldset></dl></div>
      <legend id='ogRaJ'><style id='ogRaJ'><dir id='ogRaJ'><q id='ogRaJ'></q></dir></style></legend>

      PHP 配置:依赖系统的时区设置是不安全的

      PHP Configuration: It is not safe to rely on the system#39;s timezone settings(PHP 配置:依赖系统的时区设置是不安全的)
        <bdo id='kEWxZ'></bdo><ul id='kEWxZ'></ul>

        <tfoot id='kEWxZ'></tfoot>
      • <legend id='kEWxZ'><style id='kEWxZ'><dir id='kEWxZ'><q id='kEWxZ'></q></dir></style></legend>

        <small id='kEWxZ'></small><noframes id='kEWxZ'>

          <i id='kEWxZ'><tr id='kEWxZ'><dt id='kEWxZ'><q id='kEWxZ'><span id='kEWxZ'><b id='kEWxZ'><form id='kEWxZ'><ins id='kEWxZ'></ins><ul id='kEWxZ'></ul><sub id='kEWxZ'></sub></form><legend id='kEWxZ'></legend><bdo id='kEWxZ'><pre id='kEWxZ'><center id='kEWxZ'></center></pre></bdo></b><th id='kEWxZ'></th></span></q></dt></tr></i><div id='kEWxZ'><tfoot id='kEWxZ'></tfoot><dl id='kEWxZ'><fieldset id='kEWxZ'></fieldset></dl></div>
                  <tbody id='kEWxZ'></tbody>

              1. 本文介绍了PHP 配置:依赖系统的时区设置是不安全的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                这是一个奇怪的.我刚刚升级到 php 5.3.0,升级后我收到以下警告:

                Here a weird one. I just upgrade to php 5.3.0 and since the upgrade I'm getting the following warning:

                警告:getdate() [function.getdate]:依赖系统的安全性是不安全的时区设置.你是必需的使用 date.timezone 设置或date_default_timezone_set()功能.如果您使用任何那些方法,你还在收到此警告,您很可能时区标识符拼写错误.我们选择美国/芝加哥"为'CST/-6.0/无夏令时'

                Warning: getdate() [function.getdate]: 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 'America/Chicago' for 'CST/-6.0/no DST'

                看了各种论坛,大家都说要解决这个问题,你只需要编辑php.ini中的日期区,然后重启Apache即可.

                After looking in various forums, everybody says that to solve the problem, all you have to do is edit the date zone in the php.ini and restart Apache.

                它对我不起作用.

                我试过了

                date.timezone="America/New_York"
                
                date.timezone=America/New_York
                
                date.timezone="US/Central"
                

                更改后重新启动 apache.

                Restarted apache after I made the change.

                由于我仍然安装旧版本的 php,我什至确保我正在编辑当前版本的 php 在加载时使用的 php.ini

                Since I still have the older version of php install, I even made sure that I'm editing the php.ini that the current version of php uses at the time to load

                /usr/local/php5/lib/php.ini

                仍然收到警告.

                有什么建议吗?

                感谢您抽出宝贵时间.

                推荐答案

                对原始问题发表评论的 Tchalvak 为我一针见血.我一直在编辑(我使用 Debian):

                Tchalvak, who commented on the original question, hit the nail on the head for me. I've been editing (I use Debian):

                /etc/php5/apache2/php.ini
                

                ...它对我来说具有正确的时区,并且是唯一一个在其中加载了 date.timezone 的 .ini 文件,但是当我通过 Bash 运行脚本时收到上述错误.我不知道我应该一直在

                ...which had the correct timezone for me and was the only .ini file being loaded with date.timezone within it, but I was receiving the above error when I ran a script through Bash. I had no idea that I should have been editing:

                /etc/php5/cli/php.ini
                

                也是.(好吧,对我来说它是同样",对你来说当然可能会有所不同,但我现在要让我的 Apache 和 CLI 版本的 php.ini 保持同步).

                as well. (Well, for me it was 'as well', for you it might be different of course, but I'm going to keep my Apache and CLI versions of php.ini synchronised now).

                这篇关于PHP 配置:依赖系统的时区设置是不安全的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                        <bdo id='nr5eb'></bdo><ul id='nr5eb'></ul>
                      • <small id='nr5eb'></small><noframes id='nr5eb'>

                      • <legend id='nr5eb'><style id='nr5eb'><dir id='nr5eb'><q id='nr5eb'></q></dir></style></legend>
                          <tbody id='nr5eb'></tbody>
                      • <tfoot id='nr5eb'></tfoot>
                        <i id='nr5eb'><tr id='nr5eb'><dt id='nr5eb'><q id='nr5eb'><span id='nr5eb'><b id='nr5eb'><form id='nr5eb'><ins id='nr5eb'></ins><ul id='nr5eb'></ul><sub id='nr5eb'></sub></form><legend id='nr5eb'></legend><bdo id='nr5eb'><pre id='nr5eb'><center id='nr5eb'></center></pre></bdo></b><th id='nr5eb'></th></span></q></dt></tr></i><div id='nr5eb'><tfoot id='nr5eb'></tfoot><dl id='nr5eb'><fieldset id='nr5eb'></fieldset></dl></div>