doumor942473 2010-02-06 15:31
浏览 333

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

This question already has an answer here:

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

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'

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.

It did not work for me.

I tried

date.timezone="America/New_York"

date.timezone=America/New_York

date.timezone="US/Central"

Restarted apache after I made the change.

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

Still getting the warning.

Any suggestions?

Thanks for taking the time.

</div>
  • 写回答

12条回答 默认 最新

  • doufu9145 2010-02-06 15:49
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥30 用arduino开发esp32控制ps2手柄一直报错
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿