Well, turns out that it wasn't that. I really think that it is a size thing, since I get this error on page 4/5, but if I start on page 3/5 without adding all those values to the session variable, there isn't a problem.
Is there a way to increase this size on Apache?