2

Moved an EE site (v. 2.6.1) from local to development server. On the development server, I'm getting the following:

A PHP Error was encountered

Severity: Warning

Message: date_default_timezone_get(): 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/Denver' for 'MST/-7.0/no DST' instead

Filename: libraries/Core.php

Line Number: 295

The site still loads, and I can access the CP, but this obviously is an issue. I host other EE sites on this dedicated server and they don't have the issue.

I am using master config and have played around with a few settings there from Google research, but nothing has helped.

The host has kind of left it to me, but I'm at a loss. Any suggestions on where to start?

Thanks in advance!

2

As the error says, PHP requires you to set a default timezone. This is actually quite a common error message when setting up a new server (or local development environment) with PHP.

You need to find your php.ini file on the server (ask your host where it is, or ask them to edit it for you). Find this part:

; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =

It doesn't really matter what you set the timezone here to, since EE and most PHP scripts will override it anyway. You can set it to any of these supported timezones. If you're unsure, just uncomment the line (remove the leading ;), and change it to read:

date.timezone = UTC
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.