Jump to content

Archived

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

kabir

unserialize(): Error at offset 0 of 555 bytes

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]

Share this post


Link to post
Share on other sites
Remove the error suppression (@ symbol) and see if the file_get_contents() part is working.

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites
Has anything changed on the server in the past day?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
I'd suggest checking with them. The code is too simple to be anything else if you say the response is being returned correctly.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Switch hosts?

Share this post


Link to post
Share on other sites

×

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.