Announcement

#1 2018-04-26 20:14:03

divedj
Member
2017-09-05
19

Website showing php errors related to date() and strtotime()

Hello/Hi/Greetings,

Since 2 days I get php errors all over the website. Trying to log in to the admin page I get the following:

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/include/common.inc.php on line 141

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/include/common.inc.php on line 141

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/include/common.inc.php on line 141

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/include/common.inc.php on line 141

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/admin.php on line 186

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/admin.php on line 186

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/admin.php on line 186

Warning: date(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/photoand/public_html/admin.php on line 186

Warning: Unknown: 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0

Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /home/photoand/public_html/include/functions.inc.php:628 Stack trace: #0 /home/photoand/public_html/include/functions.inc.php(628): DateTime->__construct() #1 /home/photoand/public_html/include/functions.inc.php(649): str2DateTime('2016-01-04 18:5...', NULL) #2 /home/photoand/public_html/admin/intro.php(244): format_date('2016-01-04 18:5...') #3 /home/photoand/public_html/admin.php(311): include('/home/photoand/...') #4 {main} thrown in /home/photoand/public_html/include/functions.inc.php on line 628

Any help would be nice.

Thanks a lot Dieter

Piwigo version: 2.9.3
PHP version: 5.6.35
MySQL version: 10.1.31
Piwigo URL: http://photoandcrochet.com

Offline

 

#2 2018-04-26 21:13:54

executive
Member
2017-08-16
1214

Re: Website showing php errors related to date() and strtotime()

You need to specify a timezone in your PHP config. If you don't have access to php.ini, then you need to take it up with your hosting provider.

Either way, this is not a piwigo issue.

Offline

 

#3 2018-04-26 21:59:16

divedj
Member
2017-09-05
19

Re: Website showing php errors related to date() and strtotime()

Thanks a lot, it did the job.

Offline

 

#4 2018-04-27 02:32:38

erAck
Only trying to help
2015-09-06
2026

Re: Website showing php errors related to date() and strtotime()

And a simple search in the forum for timezone would had revealed [Forum, topic 28640] Timezone warnings and [Forum, topic 28532] strange timezone error message on server about piwigo directory. and others.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact