[Added] Add check for PHP time zone warning

More
12 years 7 months ago - 12 years 7 months ago #24583 by gruz
.
phpThumb cache Images are not shown from time to time.

I digged it out. I just don't understand why it was bad not always, but from time to time.

I checked the generated image code and found a php warning there:
Code:
Warning: strtotime(): 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/Moscow' for 'MSD/4.0/DST' instead in /var/www/oscar/data/www/test.oscargo.ru/components/com_flexicontent/librairies/phpthumb/phpThumb.php on line 85

So I think it has been the problem, as all images seem to be fine now, after I have fixed it and cleaned up the cache.

As the problem is a phpThumb problem and is solved in php.ini file, my suggestion is to add a check for this warning and to inform admins in the back-end that this should be fixed.

Additional info is here:
www.go2linux.org/php-strict-time-zone-warning-drupal-wordpress

J2.5
FC - 2.0 - Rev 1612 (since 17-00 30.12.2012)
Last edit: 12 years 7 months ago by ggppdk. Reason: Changed title to describe the actual feature request

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25258 by ggppdk
Can you say where we can place this check?

is it inside phpthumb code?

I would not know where to add the check


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25263 by gruz
I'd say to catch it at the initial page, like it now check permissions. The page, which is shown instead of the articles list if there is something needed to be updated. Do you understand what page I mean?

J2.5
FC - 2.0 - Rev 1612 (since 17-00 30.12.2012)

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25264 by ggppdk
Yes, this the "POST-install Tasks" screen, that includes various checks.

BUT not setting a default timezone will create these warnings for the joomla core in J1.5 too (if error reporting is enabled)

anyway the defineconstants.php file is included by all FLEXIcontent code, and thus by FLEXIcontent system plugins, so i ll just put:
Code:
// Set a default timezone if web server provider has not done so if ( ini_get('date.timezone')=='' && version_compare(PHP_VERSION, '5.1.0', '>') ) date_default_timezone_set('UTC');

inside defineconstants.php

All web server providers that upgrade to PHP 5.3 should set the default timezone in php.ini ...

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #25265 by gruz
Cool, thanks!

J2.5
FC - 2.0 - Rev 1612 (since 17-00 30.12.2012)

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.562 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline