2012-04-27 28 views
0

我已經將php 5.3.8和Typo3 4.5.5安裝在使用lighttpd的新Web服務器上,但是現在我收到了此警告。我的操作系統是Suse 12.2 64位。什麼是lighttpd和Typo3警告?

FastCGI-stderr: PHP Warning: date() [<a href='function.date'>function.date</a>]: 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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /htdocs/XXXX/t3lib/class.t3lib_div.php on line 5968 

回答

2

它與Lighttpd和Typo3無關,它與PHP有關。

你必須定義在php.ini一個default timezone

date.timezone = "Europe/Paris" 

否則,您可以直接在你的代碼做(如果你不能編輯你的php.ini):

date_default_timezone_set("Europe/Paris"); 
0

從PHP 5.3開始,您必須明確設置PHP的時區值。 (以前的版本會回退到使用操作系統的時區設置,如果沒有明確給出PHP的話,但5.3+不再這樣做。)最簡單的方法是將其設置在您的php.ini中; good HOWTO here.