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:
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
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
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..
Offline
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