Announcement

#1 2014-10-14 22:37:53

naponline
Member
2014-10-14
20

Problem with piwigo 2.7 and Date/time settings

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

 

#2 2014-10-16 16:26:45

crono
Guest

Re: Problem with piwigo 2.7 and Date/time settings

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)

 

#3 2014-10-16 16:28:36

crono
Guest

Re: Problem with piwigo 2.7 and Date/time settings

so copy and paste
smarty_internal_templatecompilerbase.php

unsafe code removed by Mistic

Last edited by mistic100 (2014-10-16 17:12:07)

 

#4 2014-10-16 16:31:49

crono
Guest

Re: Problem with piwigo 2.7 and Date/time settings

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)

 

#5 2014-10-16 16:36:53

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13573

Re: Problem with piwigo 2.7 and Date/time settings

Offline

 

#6 2014-10-16 17:05:15

Serge D
Member
US
2014-07-15
372

Re: Problem with piwigo 2.7 and Date/time settings

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:

Code:

[PHP]
date.timezone=Europe/Berlin

No spaces

it may be beneficial to duplicate it in .htaccess as well as setting above may be ignored

Code:

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

 

#7 2014-10-16 17:08:51

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Problem with piwigo 2.7 and Date/time settings

@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

 

#8 2014-10-18 17:57:27

naponline
Member
2014-10-14
20

Re: Problem with piwigo 2.7 and Date/time settings

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

 

#9 2015-01-07 11:59:44

da-peter
Guest

Re: Problem with piwigo 2.7 and Date/time settings

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

 

#10 2015-05-01 04:50:32

Spaldam
Guest

Re: Problem with piwigo 2.7 and Date/time settings

 

Board footer

Powered by FluxBB

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