我正在获取getdate();PHP解析错误下面的每一页我的Etomite安装。
因为我尝试将服务器时区设置为EST/EDT,但错误仍然存在。我还搜索了Etomite论坛和StackOverflow,但没有找到解决方案。
注意:服务器最近已经更新到PHP 5.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
当没有指定时区时,PHP将报告一个E_STRICT
错误。在您的示例中,违规调用发生在visitor_logging.inc.php.
在包含该文件之前,您可以使用以下调用设置时区:
// Use your own correct time zone
date_default_timezone_set('America/Los_Angeles');