Page 1 of 1

Database error on first login

Posted: Wed Sep 20, 2006 10:16 am
by davidstrauss
Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1298: Unknown or incorrect time zone: ''] in EXECUTE("SET SESS in /var/www/vhosts/fourkitchens.com/subdomains/time/httpdocs/classes/adodb/adodb-exceptions.inc.php on line 78

We're running "TimeTrex v1.2.0-beta2" with "MySQL 4.1.20-log"

Re: Database error on first login

Posted: Wed Sep 20, 2006 10:26 am
by mikeb
davidstrauss wrote:Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1298: Unknown or incorrect time zone: ''] in EXECUTE("SET SESS in /var/www/vhosts/fourkitchens.com/subdomains/time/httpdocs/classes/adodb/adodb-exceptions.inc.php on line 78

We're running "TimeTrex v1.2.0-beta2" with "MySQL 4.1.20-log"
Try changing line 56 of includes/Interface.inc.php to:

if ( $db->dataProvider == 'mysql' AND $current_user_prefs->getTimeZone() != '' ) {

See if that fixes the issue. If not, you may need to load the proper timezones in to MySQL by running:

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

Or following the instructions from:
http://dev.mysql.com/doc/refman/4.1/en/ ... pport.html

Please let me know which one of these fixes the problem so I can work around it in future versions of TimeTrex.

Thanks.

Posted: Wed Sep 20, 2006 10:40 am
by davidstrauss
Did you mean line 76?

"if ( $db->dataProvider == 'mysql' ) {"

Posted: Wed Sep 20, 2006 10:48 am
by davidstrauss
With that fix (line 76), I can set my preferences, but then I get:

Fatal error: Uncaught exception 'ADODB_Exception' with message 'mysqlt error: [1298: Unknown or incorrect time zone: 'US/Central'] in EXECUTE in /var/www/vhosts/fourkitchens.com/subdomains/time/httpdocs/classes/adodb/adodb-exceptions.inc.php on line 78

Posted: Wed Sep 20, 2006 10:58 am
by davidstrauss
Okay. I got it working with the fix combined with loading time zone data into MySQL.

Posted: Wed Sep 20, 2006 11:20 am
by mikeb
davidstrauss wrote:Okay. I got it working with the fix combined with loading time zone data into MySQL.
Okay, thanks. I guess relying on the fact that MySQL has timezone data out of the box is a bad thing. I will add this to our TODO list to fix in future versions.