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]
Link to comment
Share on other sites

[!--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]
Link to comment
Share on other sites

[!--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
Link to comment
Share on other sites

[!--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.
Link to comment
Share on other sites

It's definatly a problem with the host. Every other server I upload the code on it works perfectly. HostGator is not helping me iwht the problem, they just keep telling my to contact yahoo lol.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.