Announcement

#1 2020-06-12 01:10:20

executive
Member
2017-08-16
1214

setting timezone

Hello/Hi/Greetings,

I setup another Piwigo gallery for experimentation/demonstration purposes. The server needs to run PHP 5.6 for compatibility reasons with other software.

I am getting the "datatables warning .... invalid JSON response" message in the user panel

I checked the browser debugger, and the JSON response has PHP warnings in it:


Code:

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 .../include/common.inc.php on line 126

(several times for various lines in code)

I thought, OK no problem, I'll set the time zone. So I created a PHP.INI file and put in

Code:

date.timezone = "America/Vancouver"

If I run the phpinfo() command, the default timezone is properly reported as "America/Vancouver"

But the PHP warnings persist in Piwigo.

If I switch to PHP 7, then the problem goes away.

Any ideas please?

Environment

    Piwigo 2.10.2 Check for upgrade
    Operating system: Linux
    PHP: 5.6.40 (Show info) [2020-06-11 16:09:07]
    MySQL: 5.7.30 [2020-06-11 19:09:07]
    Graphics Library: ImageMagick 6.9.4-10

Offline

 

#2 2020-06-12 11:55:36

erAck
Only trying to help
2015-09-06
2026

Re: setting timezone

Make sure that .ini file is actually loaded with your old 5.6 and the configuration not overwritten at some other place. There are several places for configurations

Configuration File (php.ini) Path =>...
Loaded Configuration File => ...
Scan this dir for additional .ini files => ...
Additional .ini files parsed => ...

Check in Piwigo's Admin -> Tools -> Maintenance, PHP Show Info, that the expected version and .ini files are loaded and date.timezone is set.

Apart from that, PHP 5.6 is way old and EOL for over a year and doesn't get security fixes. If software insists on it then that software is outdated as well..


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

Offline

 

#3 2020-06-12 17:07:31

executive
Member
2017-08-16
1214

Re: setting timezone

Yes, clicking the "show info" in Piwigo also reports the correct timezone.


Piwigo minimum requirement is PHP 5.3

Last edited by executive (2020-06-12 17:08:52)

Offline

 

Board footer

Powered by FluxBB

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