Jump to content


Photo

unserialize(): Error at offset 0 of 555 bytes


  • Please log in to reply
8 replies to this topic

#1 kabir

kabir
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 May 2006 - 02:27 PM

The PHP code is simple...

$request = "http://api.local.yah...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]

#2 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 May 2006 - 02:35 PM

Remove the error suppression (@ symbol) and see if the file_get_contents() part is working.

Info: PHP Manual


#3 kabir

kabir
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 May 2006 - 02:37 PM

[!--quoteo(post=371545:date=May 5 2006, 10:35 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 10:35 AM) View Post[/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]

#4 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 May 2006 - 02:43 PM

Has anything changed on the server in the past day?

Info: PHP Manual


#5 kabir

kabir
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 May 2006 - 02:45 PM

[!--quoteo(post=371550:date=May 5 2006, 10:43 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 10:43 AM) View Post[/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

#6 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 May 2006 - 02:46 PM

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

Info: PHP Manual


#7 kabir

kabir
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 May 2006 - 02:47 PM

[!--quoteo(post=371555:date=May 5 2006, 10:46 AM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 5 2006, 10:46 AM) View Post[/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.

#8 kabir

kabir
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 05 May 2006 - 03:05 PM

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.

#9 ober

ober
  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 05 May 2006 - 03:47 PM

Switch hosts?

Info: PHP Manual





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users