Re: Serializing Session variables. Cuts off after a given length????
From: Ken Robinson (kenrbnsn_at_rbnsn.com)
Date: 09/30/04
- Next message: Brian: "Re: 2 different time zones"
- Previous message: Salmo Bytes: "www.phpxml.org"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Sep 2004 13:15:17 -0700
Ryan Hubbard wrote:
> I've have been trying to serialize an array of objects. I can
> serialize and set a session variable and retrieve it successfully for
> a serialize string of any length within the contents of a single
> script.
>
> $_SESSION['a'] = serialize($b); // strlen($a) = 120,011
> print unserialize($_SESSION['a'])
>
>
Why are you serializing the array? You can just do a $_SESSION['a'] =
$b;
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.
Ken
- Next message: Brian: "Re: 2 different time zones"
- Previous message: Salmo Bytes: "www.phpxml.org"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|