Facing problem with PHP unserialize() function as titled it is throwing error.
unserialize() [function.unserialize]: Error at offset 0 of 1781 b
That is not legal PHP serialized data, that's PHP session data.
PHP session data uses the serialized format internally, but it is not serialized data itself.
The only thing that can safely and sanely read session data is PHP's session code. It is sometimes possible to read it using a regular expression and some creative editing, but you can not rely upon those methods.
If you need data out of a user's session, your best bet is to write a custom session wrapper and let it do the work when the data itself changes rather than try and work with the data after the fact.
(I'm not talking about custom session-writing code, I'm talking about a class that you would use instead of using $_SESSION directly.)