Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty 3.0 and PHP 5.3

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Karel S.
Smarty Rookie


Joined: 03 Aug 2009
Posts: 26
Location: The Netherlands

PostPosted: Thu Oct 01, 2009 1:32 pm    Post subject: Smarty 3.0 and PHP 5.3 Reply with quote

Code:
Warning: date_default_timezone_get(): 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 /.../Smarty.class.php on line 219


You get this warning because date functions work differently in PHP 5.3
Perhaps it is possible to keep this in mind?
Back to top
View user's profile Send private message
yankee
Smarty Rookie


Joined: 02 Mar 2009
Posts: 31

PostPosted: Sat Oct 10, 2009 10:29 pm    Post subject: Reply with quote

This is not new as of php 5.3. This message will appear as of php 5.0 when in error_reporting the E_STRICT flag is set.

Your application should take care of that. I don't think that your template engine is the right part of your application to fix this issue since it effects way more than just the template engine.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Sat Oct 10, 2009 10:35 pm    Post subject: Reply with quote

Set your date.timezone in the php.ini, and be done with it.
Back to top
View user's profile Send private message Visit poster's website
blueray
Smarty n00b


Joined: 11 Oct 2009
Posts: 4

PostPosted: Thu Oct 22, 2009 7:19 pm    Post subject: Reply with quote

Or can be set with
date_default_timezone_set([locale])

you are multi-location.
Back to top
View user's profile Send private message
andig
Smarty Regular


Joined: 22 Apr 2004
Posts: 48

PostPosted: Tue Feb 16, 2010 12:19 pm    Post subject: Reply with quote

There are couple more PHP 5.3 issues (which will be experienced by all upgrades), e.g. this one:

[Tue Feb 16 13:18:50 2010] [error] [client 127.0.0.1] PHP Deprecated: Function ereg() is deprecated in D:\\data\\htdocs\\videodb\\lib\\smarty\\plugins\\block.php.php(24) : eval()'d code on line 1

ereg(i) and ereg(i)replace are deprecated...

Best regards,
Andreas
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Feb 16, 2010 1:25 pm    Post subject: Reply with quote

There is no ereg_* calls in the smarty distribution, you must be using a 3rd party block plugin.
Back to top
View user's profile Send private message Visit poster's website
andig
Smarty Regular


Joined: 22 Apr 2004
Posts: 48

PostPosted: Tue Feb 16, 2010 3:13 pm    Post subject: Reply with quote

My apology! Should've read the "eval()'d code on line 1" more closely- the problem is within my templates...

Best regards,
Andreas

PS.: Smarty migration 2->3 went quite smoothly except for the initial hurdles where I had extended standard plugins. Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP