NYCPHP Meetup

NYPHP.org

[nycphp-talk] Unserializing big objects

Joel De Gan joel at tagword.com
Fri Feb 13 13:33:02 EST 2004


On Fri, 2004-02-13 at 10:11, Jim Musil wrote:
> Once included I try to unserialize $foo and it doesn't work. Strangely, it
> gives no error either. It works for shorter amounts of data, but there
> appears to be a limit.

What is the exact error? I have had issues with these storing very large
arrays for neural nets.

> 
> Is this a limit of unserialize or include?

You may have a limit set in your php.ini, remember for serialize, it
also needs to store a copy in memory, so you may want to not have it set
as a variable and read it directly into unserialize from a separate
file.

> 
> Since all the data is on one very long line, I tried chunk_split but
> unserialize doesn't like the new line characters being inserted into the
> data.
> 
> Any ideas?
> 

Send the exact error.

Cheers

-- 
joeldg - developer, Intercosmos media group.
http://lucifer.intercosmos.net




More information about the talk mailing list