0

getdate();を取得しています。Etomiteインストールのすべてのページで以下のPHP解析エラー。

サーバーのタイムゾーンをEST/EDTに設定しようとしましたが、エラーが解決しません。EtomiteフォーラムとStackOverflowも検索しましたが、解決策が見つかりませんでした。

注:サーバーは最近PHP5.3.6に更新されました。

ここにエラーがあります、どんな助けでも大歓迎です!


Etomite encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »

PHP error debug
Error:  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/Los_Angeles' for 'PDT/-7.0/DST' instead 
Error type/ Nr.:    Warning - 2 
File:   /var/www/vhosts/xxxxxxxxxxxxx.ca/httpdocs/manager/includes/visitor_logging.inc.php 
Line:   81 
Line 81 source: $accesstime = getdate(); 

Parser timing
MySQL:  0.0000 s s  (0 Requests)
PHP:    0.0086 s s 
Total:  0.0086 s s

4

1 に答える 1

2

E_STRICTタイムゾーンが指定されていない場合、PHPはエラーを報告します。あなたの場合、問題のある呼び出しはの行81で発生しますvisitor_logging.inc.php.

そのファイルが含まれる前のどこかで、次の呼び出しでタイムゾーンを設定できます。

// Use your own correct time zone
date_default_timezone_set('America/Los_Angeles');
于 2011-08-07T02:10:13.373 に答える