Announcement

#1 2017-05-23 10:43:01

asbacher
Member
2017-05-23
2

Warning: date(): It is not safe to rely on the system's timezone setti

Hello/Hi/Greetings,

I am also unable to access the administration side of piwigo anymore. I also get these 4 lines of "error" when visiting the gallery in public mode. This was happening with 2.8 (I updated to 2.9 and the same thing is still happening)

Piwigo version: 2.90 (same thing with 2.8X which I just updated)
PHP version: 5.6 OR 7.0 same thing
MySQL version: Server version: 10.1.23-MariaDB - MariaDB Server

Piwigo URL: https://www.shootedit.com/pictures/


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/XYZ/public_html/pictures/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/XYZ/public_html/pictures/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/XYZ/public_html/pictures/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/XYZ/public_html/pictures/include/common.inc.php on line 141


The following is lines 135 to 144 of common.inc.php

$logger = new Logger(array(
  'directory' => PHPWG_ROOT_PATH . $conf['data_location'] . $conf['log_dir'],
  'severity' => $conf['log_level'],
  // we use an hashed filename to prevent direct file access, and we salt with
  // the db_password instead of secret_key because the log must be usable in i.php
  // (secret_key is in the database)
  'filename' => 'log_' . date('Y-m-d') . '_' . sha1(date('Y-m-d') . $conf['db_password']) . '.txt',
  'globPattern' => 'log_*.txt',
  'archiveDays' => $conf['log_archive_days'],
  ));


more info from phpinfo()

_REQUEST["timezone"]    America/Los_Angeles
_COOKIE["timezone"]    America/Los_Angeles
date/time support     enabled
"Olson" Timezone Database Version     2016.10
Timezone Database     internal
Default timezone     UTC
date.timezone    no value    no value

Last edited by asbacher (2017-05-23 11:03:59)

Offline

 

#2 2017-05-24 23:04:05

tessus
Member
2017-05-24
3

Re: Warning: date(): It is not safe to rely on the system's timezone setti

I'm not sure, if the warnings have anything to do with the problem of not being able to access the admin site anymore.

But the warnings can be resolved by either setting date.time in your php.ini:

Code:

date.timezone = America/Los_Angeles

or in the .htaccess file:

Code:

php_value date.timezone 'America/Los_Angeles'

Offline

 

Board footer

Powered by FluxBB

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