Hi,
since an update to PWG 2.7.0 (and now .1) I have real problems regarding the date time settings ... when I start the administration site, I get the following warnings:
Strict Standards: strftime(): 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/Berlin' for 'CEST/2.0/DST' instead in /homepages/1/d16368409/htdocs/uniformen/include/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 177
Strict Standards: 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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/1/d16368409/htdocs/uniformen/admin/intro.php on line 116
Strict Standards: 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 'Europe/Berlin' for 'CEST/2.0/DST' instead in /homepages/1/d16368409/htdocs/uniformen/include/functions.inc.php on line 584
Strict Standards: strftime(): 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/Berlin' for 'CEST/2.0/DST' instead in /homepages/1/d16368409/htdocs/uniformen/include/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /homepages/1/d16368409/htdocs/uniformen/include/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.
In the admin-panel the german characters are not shown right, but with other signs ... also the comments don't show the German special characters like ä, ü or ö ... just look at http://www.uniformen.napoleon-online.de … ategory/25
I added
date_default_timezone_set ('Europe / Berlin');
into the config.inc.php via the local file editor.
I hope, you may help, as the situation is not very nice for the visitors ... I'm really unhappy having updated to the 2.7 family as everything went right with the 2.6 family of piwigo.
Kind regards
Markus Stein
Piwigo version: 2.7.1
PHP version: 5.5.16
MySQL version: 5.1.73
Piwigo URL: http://www.uniformen.napoleon-online.de
Offline
Piwigo team message: we strongly advise to read [Forum, post 136114 by flop25 in topic 16354] Errors or [Forum, post 115421 by plg in topic 16354] Errors instead of applying the fix suggested below
Make a backup ;)
of
/include/functions.inc.php
and
/include/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
remove your setting 'euope/berlin'
test this:
so copy and paste
functions.inc.php
unsafe code removed by Mistic
Last edited by mistic100 (2014-10-16 17:11:07)
so copy and paste
smarty_internal_templatecompilerbase.php
unsafe code removed by Mistic
Last edited by mistic100 (2014-10-16 17:12:07)
it's my final solution......
sorry for my english.
Good Luck.
PS
and
picture.php
unsafe code removed by Mistic
Last edited by mistic100 (2014-10-16 17:11:36)
Offline
Many Apache/PHP deployments do not maintain default server time zone. In this case warning above would arise.
In addition to information in link above, you should be able specify default time zone, assuming you do have FTP access, for just PWG by creating php.ini file in PWG root folder and add the following:
[PHP] date.timezone=Europe/Berlin
No spaces
it may be beneficial to duplicate it in .htaccess as well as setting above may be ignored
SetEnv TZ Europe/Berlin
This would not require code modifications and would not be lost upon PWG core update
Last edited by Serge D (2014-10-16 17:07:52)
Offline
@crono : next time don't paste the whole file, it's totally unreadable, we don't know what you modified and will become outdated quickly
there is a thing called diff to only show the modified lines
Offline
Thanks a lot ... it worked and now all functions well.
Now, I'm happy again and send congratulation for a real good software.
Greetings from Berlin
Markus Stein
Offline
I have the same issue... but it only loads that code and nothing else...I cant access admin panel...
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 /www/piwigo/admin/intro.php on line 116
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 /www/piwigo/include/functions.inc.php:584 Stack trace: #0 /www/piwigo/include/functions.inc.php(584): DateTime->__construct() #1 /www/piwigo/include/functions.inc.php(605): str2DateTime('2014-07-27 22:2...', NULL) #2 /www/piwigo/admin/intro.php(230): format_date('2014-07-27 22:2...') #3 /www/piwigo/admin.php(288): include('/www/...') #4 {main} thrown in /www/piwigo/include/functions.inc.php on line 584
This fixed it for me:
http://piwigo.org/forum/viewtopic.php?p … 14#p159014