/    Sign up×
Community /Pin to ProfileBookmark

the correct way to store igbinary serialized data into mysql

Hello guys;

I being braking my head for a few days already and I can’t find the right way to receive igbinary serialized data from mysql, I’ve already try with blob tables and all other fields types, but nothing seems to work properly, the data is stored, but the problem comes when I try to receive that data from mysql and unserialize it, all I get is the following error:

Warning: igbinary_unserialize_header: unsupported version: 1098019425, should be 1 or 2 in /var/www/html/file.php on line 72

Any comments is well appreciated.

Thanks in advance.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@priyankagoundNov 19.2013 — [U]igbinary_unserialize_header: unsupported version[/U] says that upgrading to the latest version in the repository worked, leading me to believe this is an unidentified bug.

The other half identified data being unserialized that was either not originally serialized by igbinary or corrupt. Not being originally serialized by igbinary sounds plausible here because you didn't run in to this problem in test, but you are in production. Is it possible you are trying to unserialize sessions that your users started before you switched to igbinary?

My suggestion for the next debugging step is to add some error handling somewhere to write the serialized strings that cause this error to a file somewhere. You can then test unserializing them yourself to figure out what the problem is.

Hope this helps.
×

Success!

Help @kamoiran spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...