|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Karel S. Smarty Rookie
Joined: 03 Aug 2009 Posts: 26 Location: The Netherlands
|
Posted: Thu Oct 01, 2009 1:32 pm Post subject: Smarty 3.0 and PHP 5.3 |
|
|
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 |
|
yankee Smarty Rookie
Joined: 02 Mar 2009 Posts: 31
|
Posted: Sat Oct 10, 2009 10:29 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Oct 10, 2009 10:35 pm Post subject: |
|
|
Set your date.timezone in the php.ini, and be done with it. |
|
Back to top |
|
blueray Smarty n00b
Joined: 11 Oct 2009 Posts: 4
|
Posted: Thu Oct 22, 2009 7:19 pm Post subject: |
|
|
Or can be set with
date_default_timezone_set([locale])
you are multi-location. |
|
Back to top |
|
andig Smarty Regular
Joined: 22 Apr 2004 Posts: 48
|
Posted: Tue Feb 16, 2010 12:19 pm Post subject: |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Feb 16, 2010 1:25 pm Post subject: |
|
|
There is no ereg_* calls in the smarty distribution, you must be using a 3rd party block plugin. |
|
Back to top |
|
andig Smarty Regular
Joined: 22 Apr 2004 Posts: 48
|
Posted: Tue Feb 16, 2010 3:13 pm Post subject: |
|
|
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 |
|
|
|
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
|