Yes, i know. I see a lot of questions about it.
But no one works for me until now.
I have a blog in wordpress who use serialized data for store some custom fields. It works great, but when i moved all the blog to another folder, all serialized data gonne from wordpress (but it stills in the database) So, wordpress don't detect it.
Now... i'm figthing with the code to know why isn't working. At the end... i just thinked, well, i gonna do a code for get the serialized data and it will work.
Now i'm lost, i have this:
$data = 'a:7:{s:4:"zoom";s:2:"18";s:8:"latitude";s:8:"41.37233";s:9:"longitude";s:7:"1.04283";s:11:"address_one";s:16:"Finca Riudabella";s:11:"address_two";s:33:" s/n - 43430 Vimbodí (Tarragona)";s:3:"pin";s:77:"http://espaciosparaeventos.es/wp-content/uploads/2012/02/fincas.png";s:6:"bg_img";s:0:"";}';
$data = "a:7:{s:4:1}";
$data = trim($data);
var_dump($data);
var_dump(unserialize($data));
I tried with an original serialized string from the database (the fisrt line) and returns false and a error. I done one a little bit simple, and say the same.
My error is:
Notice: unserialize() [function.unserialize]: Error at offset 5 of 11 bytes in C:\xampp\htdocs\unser.php on line 6
bool(false)
So, i don't know why i can't get data from the string!
I tried this tool http://unserialize.net/serialize and my data work just as expected :\ i need to do something else?