iceblox Posted June 1, 2008 Share Posted June 1, 2008 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 More sharing options...
nloding Posted June 1, 2008 Share Posted June 1, 2008 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. Link to comment https://forums.phpfreaks.com/topic/108239-solved-help-with-strange-error/#findComment-554830 Share on other sites More sharing options...
iceblox Posted June 2, 2008 Author Share Posted June 2, 2008 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..? Link to comment https://forums.phpfreaks.com/topic/108239-solved-help-with-strange-error/#findComment-555446 Share on other sites More sharing options...
beboo002 Posted June 2, 2008 Share Posted June 2, 2008 when supplied url not found in fsockopen() then (domain not found) "php_network_getaddresses: getaddrinfo failed: hostname nor servname provided" this type of warning gives php and i think second warnig related to first . Link to comment https://forums.phpfreaks.com/topic/108239-solved-help-with-strange-error/#findComment-555450 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.