• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Error: date_default_timezone_get() when attempting to update the "Hosting Settings"

Nebhead

New Pleskian
Hi all,

I've just installed Plesk on a brand new server, and am attempting to update the settings of the default website that was created at /smb/web/settings/id/1

When I do so, I get the following error displayed at the top of the page:

Error: 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 'Europe/London' for 'BST/1.0/DST' instead

I've taken a look at other articles/posts, but none of them seem to address this particular issue; the plesk conf files have the correct settings, and I tried updating the php.ini file at /etc/php5/cli/php.ini to manually set the date.timezone setting to 'Europe/London', all to no avail.

Any help would be appreciated.
 
Have you checked and set it at

Code:
/usr/local/psa/admin/conf/php.ini

That is the php.ini config file that plesk uses!
 
Hi Abdi,

Thanks for the reply. I have updated the config file as you suggested, but I will still frequently (but not always!) get the same error. Sometimes it appears in a red box at the top of the page, sometimes as a full page error.

I've done a basic install, with no custom configuration or manual intervention/changes apart from adding the date.timezone setting to two conf files as described above, on a brand new instance of a server, so I'm really confused as to why this system-breaking issue should be occuring.
 
I've done a basic install, with no custom configuration or manual intervention/changes apart from adding the date.timezone setting to two conf files as described above, on a brand new instance of a server, so I'm really confused as to why this system-breaking issue should be occuring.

When you did this, did the error also occur on the new installation?
 
When you did this, did the error also occur on the new installation?

Yes; it is this new installation that I'm talking about. It's a brand new "out-the-box" server that I've installed Plesk on. I don't understand why this issue keeps arising as it prevents me from doing almost anything with the system.
 
Back
Top