Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
A lot of ugly timezone code since upgrading Textpattern
Hi everyone,
I upgraded to Textpattern 4.2.0, and somehow created a real mess in my comments area. This never happened before the upgrade. In the new window for writing a comment (but nowhere else), the following code appears at the top of the window:
Strict Standards: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1262
Strict Standards: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1263
Strict Standards: Non-static method timezone::is_dst() should not be called statically in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1265
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1299
Strict Standards: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1262
Strict Standards: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1263
Strict Standards: Non-static method timezone::is_dst() should not be called statically in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1265
Strict Standards: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/rcsmith/public_html/textpattern/lib/txplib_misc.php on line 1299
I noticed that I didn’t have a Timezone enabled in preferences, so I changed it, but I think the problem is still the same. Does anyone have any advice? The comments still work, but the experience is terrible… Thanks a lot.
The website is ryancecilsmith.com/sketchbook
Last edited by ryancecilsmith (2009-10-25 22:43:06)
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
Not related, but there are a few </if_individual_article>
closing tags floating around the page (visible in the page source).
I think you only get these warnings using E_STRICT error reporting in PHP, which is not what you would ordinarily want to use for the public side of a production site. If you don’t have access to your php.ini, you could try sticking this at or near the top of your page templates:
<txp:php>error_reporting(0);</txp:php>
The question is whether that would be early enough to precede the warnings.
Code is topiary
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
If timezone features do not work in your PHP enviroment, you can disable them by adding this line to /textpattern/config.php
somewhere between the opening and closing <?php [...] ?>
tags:
define('NO_TIMEZONE_SUPPORT', true);
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
Thanks for the responses!
Jsoo, I tried inserting the error reporting tag into the top of my page like so, but to no avail:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><txp:page_title /></title>
<link rel="home" href="<txp:site_url />" />
<txp:feed_link flavor="atom" format="link" label="Atom" />
<txp:feed_link flavor="rss" format="link" label="RSS" />
<txp:css format="link" />
<txp:rsd />
<txp:php>error_reporting(0);</txp:php>
</head>
I’ll try changing my php… stuff.
Wet, I know how to access the config file, but I’m hesitant to disable my timezone features, since I live in a timezone very far from most of my audience. Jsoo, thanks for telling me about those tags… I’ll go hunting. I don’t see why I wouldn’t have access to php.ini… except I don’t know what is. Can I find it using an FTP client such as Fetch, and open it in Adobe GoLive? If so, I can change it. Thanks very much everyone.
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
In the meanwhile, I just changed my comments mode to “no popup” and the problem is masked… but I did like the popup, and I would like to solve this problem….
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
ryancecilsmith wrote:
Jsoo, I tried inserting the error reporting tag into the top of my page like so, but to no avail:
OK, not early enough, then. You could try Robert’s solution (and he is the lead developer of Txp, so what he says is bound to be good advice), or a hybrid: stick error_reporting(0);
(without the <txp:php>
tags) into config.php.
I don’t see why I wouldn’t have access to php.ini… except I don’t know what is. Can I find it using an FTP client such as Fetch …
If you’re on shared web hosting you aren’t going to have access to it.
Code is topiary
Offline
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
Hey thanks for the help everyone. I’m going to stick with keeping the comments in “no-popup,” since I don’t want to turn off all error-reporting forever, and the problem is basically solved this way. Also it’s 100x easier than trying to figure out how to change .config stuff (I’m quite a noob)
According to the other thread, it looks like a plugin could be causing this. I guess I’ll go through and see what I can update/remove. Thanks again.
Offline
Re: A lot of ugly timezone code since upgrading Textpattern
Offline