Loading...
 

Out of memory bug in tikidate-php5.php

Status
Open
Subject
Out of memory bug in tikidate-php5.php
Version
6.x
Category
  • Error
Feature
Date and Time
Cookie
Submitted by
felix hruschka
Lastmod by
felix hruschka
Rating
(0)
Description

Background: I'm in the process of an overdue upgrade of two Tikis from version 2.2 to the new LTS version 6.x. Testing and adaptation of styles was done on XAMPP localhost under Windows and all worked fine. Problems began with installing on public server (Debian). Installation is done from shell (tar.gz and running setup.sh) and a fresh install works fine.

Problem: When I use the existing database (no problems at database upgrading to 6.2 reported) then it also works fine for anonymous user. But as soon as I try to login as admin user, I get a long wait and then:

Fatal error: Out of memory (allocated 110100480) (tried to allocate 157 bytes) in /home/hrusccbo/tikitest.hruschka.com/tiki-6.2/lib/init/initlib.php on line 185
(Note: the line number 185 varies)

In order to locate the error, I entered the following line in initlib:

171: print ("a:$errno, b:$errstr, c:$errfile, d:$errline");

The result is that Tiki starts displaying thousands of times, in an endless loop, until memory exhaustion:
a:2, b:DateTimeZone::__construct() datetimezone.--construct: Unknown or bad timezone (M), c:lib/tikidate-php5.php, d:182

From that I deduct that the error originates from line 182 of tikidate-php5.php


Some other findings which might be useful:

The last days I tried to enter dev.tiki.org and themes.tiki.org, but could not because the sites displayed exactly the same error. Yesterday I went to IRC chat and was advised to clear the cookies of my browser. After that it worked.

Looking at the cookies now, I found that "local_tz" (I assume that has to do with timezone) of my working tw_2.2 had the content "22%3A37%3A23", the cookie from tiki.org has now the content "UTC", but the cookies from working XAMPP/localhost and from the not working Debian 6.2 installation have both the content "M".

This fits to the origin of the error, as line 182 is "function setTZbyID" which calls "function convertMissingTimezone", where "M" is used in a switch/case statement.

But probably the bug is not really in the tikidate script, but where the cookies are set !!! (see below under "workaround")

Hope that helps to locate the bug and that it can be solved in 6.3. In the meantime I'll wait with migrating.

Thanks to all of you for your great work.
Felix
(running 3 tiki sites since 2005)

Solution
Sorry, my programming skills go not that far
Workaround

If I delete the "local_tz" cookie while navigating, then it allows me exactly one operation (e.g. to login). The cookie is then set again. To make a next click I have to clear that cookie again.

(This is not really a feasible "workaround", but maybe a helpful observation)

Still not entirely tested: if I enter a timezone in my preferences, then the error seems to go away. Do preferences override the cookie??? (I have 1000+ users on one tiki website ... mostly all of them have no timezone preference entered)

Importance
8
Rating (deprecated)
(0)
Ticket ID
3837
Created
Sunday 27 March, 2011 21:37:53 GMT-0000
LastModif
Sunday 27 March, 2011 22:10:05 GMT-0000

Attachments

 filenamecreatedhitscommentversionfiletype 
No attachments for this item


Keywords

The following is a list of keywords that should serve as hubs for navigation within the Tiki development and should correspond to documentation keywords.

Each feature in Tiki has a wiki page which regroups all the bugs, requests for enhancements, etc. It is somewhat a form of wiki-based project management. You can also express your interest in a feature by adding it to your profile. You can also try out the Dynamic filter.

Accessibility (WAI & 508)
Accounting
Administration
Ajax
Articles & Submissions
Backlinks
Banner
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Calendar
Category
Chat
Comment
Communication Center
Consistency
Contacts Address book
Contact us
Content template
Contribution
Cookie
Copyright
Credits
Custom Home (and Group Home Page)
Database MySQL - MyISAM
Database MySQL - InnoDB
Date and Time
Debugger Console
Directory (of hyperlinks)
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
DogFood
Draw
Dynamic Content
Preferences
Dynamic Variable
External Authentication
FAQ
Featured links
Feeds (RSS)
File Gallery
Forum
Friendship Network (Community)
Group
Help
History
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
jQuery
Kaltura video management
Karma
Live Support
Logs (system & action)
Lost edit protection
Mail-in
Map
Menu
Meta Tag
Missing features
Visual Mapping
Mobile
Mods
Modules
MultiTiki
MyTiki
Newsletter
Notepad
OS independence (Non-Linux, Windows/IIS, Mac, BSD)
Organic Groups (Self-managed Teams)
Packages
Payment
PDF
Performance Speed / Load / Compression / Cache
Permission
Poll
Profiles
Quiz
Rating
Realname
Report
Revision Approval
Scheduler
Score
Search engine optimization (SEO)
Search
Security
Semantic links
Share
Shopping Cart
Shoutbox
Site Identity
Slideshow
Smarty Template
Social Networking
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Staging and Approval
Stats
Survey
Syntax Highlighter (Codemirror)
Tablesorter
Tags
Task
Tell a Friend, alert + Social Bookmarking
Terms and Conditions
Theme
TikiTests
Timesheet
Token Access
Toolbar (Quicktags)
Tours
Trackers
TRIM
User Administration
User Files
User Menu
Watch
Webmail and Groupmail
WebServices
Wiki History, page rename, etc
Wiki plugins extends basic syntax
Wiki syntax text area, parser, etc
Wiki structure (book and table of content)
Workspace and perspectives
WYSIWTSN
WYSIWYCA
WYSIWYG
XMLRPC
XMPP




Useful Tools