Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10
4 posts by 2 authors in: Forums > CMS Builder
Last Post: March 20, 2008 (RSS)
By webdude - March 20, 2008
There is a call to PHP function timezone_abbreviations_list() which is only available on PHP versions > 5.10 ish (depending on who you talk to). PHP manual says PHP >= 5.1.0 (http://php.net/timezone_abbreviations_list).
This is causing the Admin:General Settings page to crash with fatal error:
Call to undefined function timezone_abbreviations_list() in ... lib/menus/admin/actionHandler.php
We are running official updated CentOS 5 (which is essentially RHEL5) and the function is not available in the PHP version (5.16).
Any thoughts? How can I be the only one noticing this? Maybe I'm the only one running CMS Builder v1.10 who doesn't have bleeding-ish edge PHP and who has tried to view the Admin:General Settings page.
Re: [webdude] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10
By Dave - March 20, 2008
The php docs say both should be available from v5.10 up but I as well have noticed the PHP docs aren't always accurate.
There's a fallback system for PHP versions that don't support the recent PHP5.1(ish) timezone functions but it checks to see if date_default_timezone_set() is defined to see if that's necessary.
Can you just try this code on your server and let me know what it prints? Save it as test.php:
<?php
echo "This is PHP v" . phpversion() . "<br/>\n";
echo "date_default_timezone_set: " . function_exists('date_default_timezone_set') . "<br/>\n";
echo "timezone_abbreviations_list: " . function_exists('timezone_abbreviations_list') . "<br/>\n";
?>
Thanks for the bug report!
interactivetools.com
Re: [Dave] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10
By webdude - March 20, 2008
Well I guess this explains the bug. Here is the output to the code you asked me to run:
This is PHP v5.1.6
date_default_timezone_set: 1
timezone_abbreviations_list:
Your hypothesis seems correct. Either PHP docs are a little screwy or my php is a little screwy (or both?).
Let me know if this helps... I really appreciate your patience in troubleshooting!
Re: [webdude] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10
By Dave - March 20, 2008
Foreach each of these files, search for 'date_default_timezone_set' (with quotes) and replace it with 'timezone_abbreviations_list' (with quotes).
/lib/init.php
/lib/common.php (occurs twice in this file)
/lib/menus/admin/actionHandler.php
/lib/menus/admin/general.php
And I'll add code for that to the next version (v1.12) so you don't need to redo it when you upgrade.
Let me know if that works for you.
interactivetools.com