Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serialized data in database #1

Closed
truth4oll opened this issue Jul 22, 2015 · 5 comments
Closed

serialized data in database #1

truth4oll opened this issue Jul 22, 2015 · 5 comments
Assignees

Comments

@truth4oll
Copy link

Save serialized data in database through base64_encode, and get through base64_decode.
It helps avoid popular error with offset

@baibaratsky
Copy link
Owner

Hi! Could you provide more info on this error. I use this way to store serialized data for about 5 years without any problems.

@baibaratsky
Copy link
Owner

Oh, I think I know what you mean. The problem appears when you use non-UTF8 encoding in your database. Ok, I'll add this feature soon.

@truth4oll
Copy link
Author

@baibaratsky
Copy link
Owner

Your example is not about DB, it’s on submission of serialized data with HTML forms.
Here is more related one: http://www.jackreichert.com/2014/02/02/handling-a-php-unserialize-offset-error/

@baibaratsky
Copy link
Owner

As I said, there’s no problem when you use UTF8 in the DB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants