Cybercartel
Cybercartel

Reputation: 12592

What is this lighttpd and Typo3 warning?

I've php 5.3.8 and Typo3 4.5.5 installed on my new webserver with lighttpd but now I'm getting this warning. My OS is a Suse 12.2 64 bit.

 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

Upvotes: 0

Views: 366

Answers (2)

Jason A. Lefkowitz
Jason A. Lefkowitz

Reputation: 966

As of PHP 5.3 you have to explicitly set a timezone value for PHP. (Previous versions would fall back to using the OS's timezone setting if one wasn't explicitly given to PHP, but 5.3+ don't do that anymore.) Easiest way to do that is to set it in your php.ini; good HOWTO here.

Upvotes: 0

j0k
j0k

Reputation: 22756

It's not related to Lighttpd nor Typo3, it's related to PHP.

You have to define a default timezone in your php.ini:

date.timezone = "Europe/Paris"

Otherwise, you can do it directly in your code (if you can't edit your php.ini):

date_default_timezone_set("Europe/Paris");

Upvotes: 2

Related Questions