Welcome Guest, Not a member yet? Register   Sign In
Serializing Data - I found this helpful
#1

[eluser]internut[/eluser]
Hey All,

I just took this to good use. Thoughts?

http://davidwalsh.name/php-serialize-unserialize-issues
#2

[eluser]Colin Williams[/eluser]
Not sure I've ever had an issue with serialization. Also, not sure on what version of PHP that solution is based. As for storing serialized objects in the database, well, it's fine (great, actually) for stuff like simple settings variables, but querying against it is near impossible and wholly impractical.
#3

[eluser]internut[/eluser]
Yeah, settings great. Never if needed for query / search. No way!
#4

[eluser]jedd[/eluser]
Hi Internut.

Fuzzy had a similar problem a while ago, though related to the transfer of information through the URI, and came up with a [url="http://ellislab.com/forums/viewthread/107741/"]similar solution[/url] (by similar I mean also using base64).

There might be something in retaining a generic 'take you back to the 80's' helper function that gives you a 7-bit safe string.
#5

[eluser]TheFuzzy0ne[/eluser]
That helper will work for you. You'd just need to load the helper and substitute the base64_encode with url_base64_encode and base64_decode with url_base64_decode.

EDIT: I also had another problem where I was using urlencode() to encode the URL, and having %2 in the URL broke the request at the server level (the index.php was never even loaded), because my server parsed it as a "/", and this also helps with that issue, but makes for "fugly" URLs.

Off-topic: urlencode()... What's with that? Shouldn't it have been url_encode()?? Was the function implemented before they invented the underscore? Maybe whoever coded it, has his underscore key stolen by a colleague as a horrible prank (I know that having to use a biro or other sharp object to type an underscore would drive me nuts!). Maybe it was written in camel case, but it all went to pot because it didn't matter because PHP isn't case sensitive? Does anyone actually have an explanation for it?




Theme © iAndrew 2016 - Forum software by © MyBB