On my site I have a script that displays random quotes and messages.
It used to work fine for over 3 years but for the past two weeks I keep getting the following errors which show up randomly and if you refresh the site the script might work fine again.
Warning: main(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/httpd/vhosts/domain/httpdocs/index.php on line 76
At first, the script was setup to open up a small text file and display the text which it contained. The person who hosts the site for me suggested that instead of opening the file I should try a php array. So I did that and I still get the error that I posted above. The error seems to be intermittant.
I have also been told that the /tmp/ directory has been cleared. But that didnt resolve the problem.
Does anyone know what this error means and how to fix it?
In this case 'domain.com' is located on the server which is trying to contact it. A friend of mine is hosting the site on his dedicated server. Would the reasons that you specified still apply?
Actually, it was only today that I changed the include() to use a full URL. Prior to that I was using a relative address so it didnt even include domain.com in it.
I am guessing its some sort of a server problem, I just dont know what. Although when contacting the host (its a managed server) they say that this must be a temporary problem and just wait to see if it happens again...but it was explained that its intermmitent and has been occuring for the past 2-3 weeks.
I am not sure I am giving you the right info. Correct me if I am wrong. I think the include path is:
I dont have access to shell right now so I cant ping the site. Pinging it from my pc I get 4 replies. Also I have a ping script on my site which pings a host from the server (where my site is located) and I get all replies.
To get the quotes I use the following code right now:
<?php include "http://www.domain.com/articles/quotes/quotes.php";?>
Prior to utilizing a php script which uses an array to store the quotes I was using the following script to pull the text out of a file and periodically I would get the same error.