Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Ryan Hubbard
September 30, 2004, 2:21 pm
rate this thread
serialize and set a session variable and retrieve it successfully for
a serialize string of any length within the contents of a single
$_SESSION['a'] = serialize($b); // strlen($a) = 120,011
But if I set a session variable and then try to access it on another
page the session variable is always truncated at 67,789 in length. So
the unserialize function cannot correctly interrupt the variable. Why
are my serialized session variables truncated at 67,789???
Re: Serializing Session variables. Cuts off after a given length????
Why are you serializing the array? You can just do a $_SESSION['a'] =
Data is automatically serialized when it is inserted into a SESSION. So
the session variable really has a serialized serialized array.
I don't know if not serializing the array before you store it will
help, but it's worth a shot.