I am trying to serialize a php object then unserialize it.
When I serialize, and then put the obtained string in a file, then read the file and unserialize, all works fine.
When I serialize, and then store the obtained string in a database field, then read it back and try to unserialize, that does not work. I noticed that the string I read from the database contains some special characters (like "e;). I tried to get rid of those by using htmlspecialchars_decode, but still the unserialize does not work (the message : unserialize(): Error at offset 1774 of 24239 bytes). When I try to see those characters I do not see anything special.
Any help?