Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10

 

 


webdude
User

Mar 20, 2008, 2:47 AM

Post #1 of 4 (218 views)
Shortcut
Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10 Can't Post

In the file lib/menus/admin/actionHandler.php

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:

Code
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.


Dave
Staff / Moderator


Mar 20, 2008, 10:35 AM

Post #2 of 4 (214 views)
Shortcut
Re: [webdude] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10 [In reply to] Can't Post

That's strange. So that must mean that you have date_default_timezone_set() but not timezone_abbreviations_list()?

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:


Code
 
<?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!

Dave Edis - Senior Developer
interactivetools.com


webdude
User

Mar 20, 2008, 10:46 AM

Post #3 of 4 (211 views)
Shortcut
Re: [Dave] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10 [In reply to] Can't Post

Hi Dave,

Well I guess this explains the bug. Here is the output to the code you asked me to run:

Code
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!


Dave
Staff / Moderator


Mar 20, 2008, 1:15 PM

Post #4 of 4 (207 views)
Shortcut
Re: [webdude] Bug: Call to timezone_abbreviations_list() in CMS Builder v1.10 [In reply to] Can't Post

We could try testing for timezone_abbreviations_list() instead of date_default_timezone_set().

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.

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4