php5: Unserialize Large Objects with References

php.internals

David Giffin

22 years ago
Hi there, I've been using the unserialize and serialize methods in php5 on some rather large objects it seems that the larger object get the following errors: Notice: unserialize(): Error at offset 6167 of 31195 bytes in /root/doServerStates.php on line 37 Different smaller object: Notice: unserialize(): Error at offset 6179 of 21955 bytes in /root/doServerStates.php on line 37 The error offset is different based on the the size of the total file. I'm trying to put together a test case to replicate the issue. I wanted to see if anyone has already identified this issue before taking the time to do the test case. Thanks, David

Pierre-Alain Joye

22 years ago
On Tue, 3 Feb 2004 15:44:17 -0800 (PST) david@agent911.com (David Giffin) wrote:
> > Hi there, > > I've been using the unserialize and serialize methods in php5 on some > rather large objects it seems that the larger object get the following > errors: > > Notice: unserialize(): Error at offset 6167 of 31195 bytes in > /root/doServerStates.php on line 37 > > Different smaller object: > > Notice: unserialize(): Error at offset 6179 of 21955 bytes in > /root/doServerStates.php on line 37 >
Do you store the serialized data in a file betweep the ops? If yes, check that you use binary mode only. I got similar errors in the past. pierre