Things were worse than I thought, I realised I was unable to post to my blog, it kept throwing those same errors:
Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/account/public_html/sitefolder/blog/wp-includes/class-snoopy.php on line 1142
After much troubleshooting with a support guy it seems that it is because they have changed something. This is what he said:
We have disabled allow_url_fopen php configuration on the server due to its hacking vulnerabilities , very few applications require it, and by disabling it we will prevent exploitation of PHP remote include vulnerabilities.
Applications that do require it can be modified to use cURL instead.
Please contact your developer and modify the code in your filename.php as follows.
Instead of:
$file_contents = file_get_contents('http://example.com/ ');
// display file
echo $file_contents;
?>
Use this:
`$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, 'http://example.com ');
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
// display file
echo $file_contents;
?>
I don't really know what that means or what file to change.
He then said he'd re-enabe the allow_url_fopen php configuration but ssaid that it actually made no difference and that the problems were actually being caused by bad coding on my blog. But I hadn't changed anything so I am not sure what he was referring to exactly.
I then did what I should have done at first seeing this problem. I turned all my plugins off. The problem went away. One by one I turned them back on. Until I got to
image caption
This was the culprit!
I am not sure what it is about this particular plugin that suddenly has a disagreement with my blog but leaving it off solves the problem. But I like this plugin and would lke to use it so I looked at the code. I recognise the call to
class-snoopy.php
that was mentioned in the error message.
I don't know what all this means but I am hoping that someone else might be able to help. What is it about this plugin that suddenly stuffed up my blog with this errors and firewall restrictions on the outgoing connections?
Thanks.
(PS: I know it would be more helpful if I posted a link to the site but I'd rather not make the address of the site public....sorry.)