Jump to content

[SOLVED] Help with strange error


iceblox

Recommended Posts

Hi Guys,

 

When i execute a file upload script on my site, i have recently been getting this error but the script has not changed. Can anyone tell me what this error is and how i might solve it?

 

Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/local/psa/home/vhosts/site.com/httpdocs/cron/uploadcsv.php on line 9

Warning: file(http://www.feed.co.uk/feed/single.php?partner=mpdu&selection=A&cashback=A&fields=Offer.ID-Offer.PhoneCost-Offer.TotalCost-Offer.MonthlyCost-Offer.FreeGift-Offer.OfferCashback-Offer.AutoCashback-Offer.OfferRental-Offer.OfferLength-Offer.Link-Model.ID-Model.Make-Model.Name-Model.ImageLarge-Model.ImageSmall-Model.Popularity-Tariff.Name-Tariff.ContractLength-Tariff.Rental-Tariff.NiceName-Tariff.FreeMins-Tariff.FreeMinsType-Tariff.FreeTxts-Tariff.Allowance-Network.Name-Network.Image-Merchant.Name-Merchant.Image-Deal.Popularity&track=URMOB-xmake-xmodelx-xtariffx) [function.file]: failed to open stream: Unknown error: 0 in /usr/local/psa/home/vhosts/site.com/httpdocs/cron/uploadcsv.php on line 9

Warning: Invalid argument supplied for foreach() in /usr/local/psa/home/vhosts/site.com/httpdocs/cron/uploadcsv.php on line 12
Upload Completed

 

Thanks in Advance,

 

Phil

Link to comment
https://forums.phpfreaks.com/topic/108239-solved-help-with-strange-error/
Share on other sites

Read the errors, they tell you what they are.  You have an issue on line 9 of your script for the first two errors (I'm not familiar with the file() function), and your foreach statement doesn't have valid arguments on line 12.  They might be related -- if one of the arguments to foreach came from opening that file, then that's why.

 

Post the actual code so you can help you debug it.

Im unable to post my code right now as Im at work, but could their be a reasonable explanation for the first error of the three?

 

As my script hasnt changed and that error only just appeared. could it be that php is having trouble accessing the site? As the site I get my feed from is having hosting troubles and I wasnt sure if they could be related..?

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.