Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Seeing bizarre offset error in Framework.Functions.php intermittently

Andy KAndy K
edited November 2007 in Vanilla 1.0 Help
Hey all, I'm seeing this appear and disappear every few minutes on my forum, on the Discussion page on top of the discussions, or on a conversation thread on top of the conversation:

Notice: unserialize() [function.unserialize]: Error at offset 253 of 330 bytes in /mnt/gs02/herd03/29139/domains/story-games.com/html/forums/library/Framework/Framework.Functions.php on line 874

It seems cosmetic, but I'd like to get to the bottom of it in case something is bus'sed.

To see it in action:
http://www.story-games.com/forums/comments.php?DiscussionID=4487

It affects some specific threads, and not others. Also, it seems to appear and disappear. It's always the same error, same "offset 253 of 330 bytes". I checked into Framework.Functions and there's no line 874 in that file (could be complicated by an include?). Any thoughts?

-Andy

Comments

  • You need to know what is calling unserialize.
  • Heya... I'm all storage hardware and not a lot of db/mySQL exp (I'm like a multiclassed level 2 mySQL amateur, level 6 berserker)... How do I find out what is making the unserialize calls?

    -Andy
  • Huh, after some total guesswork and troubleshooting, I think I have figured it out:

    It appears that this ONLY happens in threads where posts are made by a user named "thark". Threads where he posts, those messages appear. Threads where he doesn't post, no messages appear. He's using plain text, no HTML. Bizarre. Any thoughts?
  • Locked it down further:

    It ONLY happens when I have "Named Vanilla Theme" enabled, AND that user takes place in the discussion. Which indicates that there's possibly a problem with his name? The dude is Swedish, but I double-checked his user entry in mySql to make sure there was no UTF-8 weirdness (umlauts, etc).

    Ah well, If anyone has suggestions I'm all ears, otherwise I'll follow up with that theme's designer to see if he's got ideas.

    -Andy
  • Are you using php5?

    with php5 you can use debug_print_backtrace to how a function is executed.
  • You need Max_B help on this one.
  • RESOLVERATED!!

    Gosh, now I must be a Lvl 3 mySQL amateur admin for figuring this one out.

    OK, here's what happened:

    1) I recently migrated mySQL to a new server (a new host even, I ditched Dreamhost and went with Media Temple).

    2) Unfortunately, the dump did not preserve UTF-8. Disappointing, because I sometimes use Japanese and Russian. But not a show-stopper. But all UTF-8 fonts and stuff were changed to gibberish ANSI characters. (one of these days I'll have to learn to dump UTF-8 enabled mySQL dbs...)

    3) User "thark" is Swedish. In his "attributes" field on his profile, he had some stuff about where he lived and stuff, with the, crazy Swedish characters. Like the "a" with the swedish meatball on top, that sort of thing.

    4) If I were to go to his personal account page, I see the error. But nowhere else.

    So, the issue was related to the UTF-8 --> ANSI corruption of the move, and his profile (specifically "Attributes", see below).

    5) Complication: I had the Named Vanilla awesome theme up, which pulls some account information about the user for mouse-overs. So it was pulling something related to attributes, and so was bringing those errors into any comments page that the user commented in.

    SOLUTION: Deleted the user's Attributes entries on the database, will have him re-create by hand. This time it should work even with UTF-8 stuff (as long as it's not garbled ANSI).
This discussion has been closed.