I was doing an upload php script when I received this error.
Warning: copy() [function.copy]: php_network_getaddresses: getaddrinfo failed: Name or service not known in
The first thing to check is if your computer is connected to the internet. This error can happen when the DOMAIN.COM does not resolve, so the work around at this point is retrieving the IP of the said DOMAIN.COM, which when added will be http://IPAddress.com not http://DOMAIN.com. If this is okay then the next to work on would be the PHP.ini file, turn on both
ALLOW_URL_FOPEN=On
ALLOW_URL_INCLUDE=On
This should resolve the issue.
In my case the issue was ALLOW_URL_INCLUDE=Off, which when On worked out.