php5.3 the system's timezone ERROR MESSAGE 报错处理

| | Comments (0)



ERROR MESSAGE: date() [function.date]: It is not safe to rely on the system's timezone settings

如果你在升级到最新php版本后,得到如上所示错误提示,那是因为最新版的php5.3 date() 函数的重写所至,解决这个问题,有两种方法:

  1. 方法 1) 编辑服务器的php.ini文件
  2. 简单的编辑php.ini文件设置 date.timezone值( date.timezone = "timezone_here"),timezone的设置参考值在php.net website,设置修改保存 后,需要重起服务器。

  3. 方法 2) 编辑修改php文件(涉及date()函数的php文档)

  4. 如果你没有权限修改php.ini文件,直接在php文档最下方加上(date_default_timezone_set( "timezone_here" );)。

ERROR MESSAGE: date() [function.date]: It is not safe to rely on the system's timezone settings

If you receive the above error message, this is due to latest PHP5 date() function rewrite. To solve this issue, you can edit the php.ini or phplive/system.php.

Solution 1) Editing the php.ini file (recommended):

To solve this issue, simply edit your php.ini file and set your date.timezone value:

date.timezone = "timezone_here"

You can view supported timezone values at the PHP.net Website

After you set the date.timezone value, you will need to restart your web server.

Solution 2) Editing the phplive/system.php file:

If you do not have access to the php.ini file, you can further edit the system.php file and add the following code at the bottom of the file:

date_default_timezone_set( "timezone_here" );

Leave a comment

Archives

Ads by google

Pages

Powered by Movable Type 4.24-en

About this Entry

This page contains a single entry by 单点日志 published on August 11, 2009 2:32 PM.

拍一下又不会怀孕 was the previous entry in this blog.

生命就像流星 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.