Home > Uncategorized > Problem with Serialization and unserialisation

Problem with Serialization and unserialisation

Today I was facing some problem with serialisation and unserialisation.

I have serialised a value and kept in another file(say name out.txt). In an another script I loaded the content of out.txt and just unserialize the content .

Now when accessing the content by property it was showing me nothing.

When accessing method it shows me error ”
Please ensure that the class definition “Test” of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition ”

here Test is my class name.

So, from the error Now I know when you have to deserialize an serialised object you must have to give the class definition where you are trying to deserilize.

YEAAAAA, Now, I get out of the hell.

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: