0
我得到了getdate();在我的Etomite安裝的每個頁面下面的PHP解析錯誤。在PHP 5.3.6上用getdate()觸發這個PHP分析錯誤是什麼?
由於我嘗試將我的服務器時區設置爲EST/EDT,但錯誤仍然存在。我也搜索了Etomite論壇和StackOverflow,但找不到解決方案。
注:服務器最近已經更新到5.3.6 PHP
這裏的錯誤,任何幫助將不勝感激!
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
它不是一個語法錯誤,這是一個錯誤確定您的時區。你準確地設置了你的時區和地點? – deceze
它在調試中已經說明了,不是嗎? 「依靠系統的時區設置是不安全的,你需要*使用date.timezone設置或者date_default_timezone_set()函數。如果你使用了這些方法中的任何一種,並且你仍然得到這個警告,你最可能拼錯了時區標識符。「 –
我認爲你應該爲時區選擇不同的格式。看到這個:http://www.zen-cart.com/forum/showthread.php?t=150719 –