Jump to content

unserialize(): Error at offset 0 of 555 bytes


kabir

Recommended Posts

The PHP code is simple...

$request = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=NorthviewHS&city=columbia&state=SC&output=php";
$response = @file_get_contents($request);
$phpobj = unserialize($response);

The code worked yesterday, and all of a sudden I am getting unseialize errors. Please Help!
You can see what I am tlaking about here... [a href=\"http://northviewhigh.com/test.php\" target=\"_blank\"]http://northviewhigh.com/test.php[/a]
[!--quoteo(post=371545:date=May 5 2006, 10:35 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 10:35 AM) [snapback]371545[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Remove the error suppression (@ symbol) and see if the file_get_contents() part is working.
[/quote]

Thanks, but that part does work, I even printed out the contents of $response and it is correct. Any other ideas?


I;m using the code directly supplied from yahoo, no idea why its not working!
[a href=\"http://developer.yahoo.com/common/phpserial.html\" target=\"_blank\"]http://developer.yahoo.com/common/phpserial.html[/a]
[!--quoteo(post=371550:date=May 5 2006, 10:43 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 10:43 AM) [snapback]371550[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Has anything changed on the server in the past day?
[/quote]

I do not believe so, It is possible however. Its a managed shared hosting account that I rent from hostgator.com
[!--quoteo(post=371555:date=May 5 2006, 10:46 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 10:46 AM) [snapback]371555[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I'd suggest checking with them. The code is too simple to be anything else if you say the response is being returned correctly.
[/quote]

K thanks, I'll email their tech support, thanks for the help, let me know if oyu come up with any other ideas.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.