I can load a remote file (http) from the php CLI:
php > print_r(getimagesize("http://www.google.ca/intl/en_ca/images/logo.gif"));
Array
(
[0] => 276
[1] => 110
[2] => 1
[3] => width="276" height="110"
[bits] => 8
[channels] => 3
[mime] => image/gif
)
However, the exact same code from a web script gives me:
[Thu Sep 03 21:47:53 2009] [error] [client 127.0.0.1] PHP Warning: getimagesize() [<a ref='function.getimagesize'>function.getimagesize</a>]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/html/Whatsize/index.php on line 30
[Thu Sep 03 21:47:53 2009] [error] [client 127.0.0.1] PHP Warning: getimagesize(http://www.google.ca/intl/en_ca/images/logo.gif) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/html/Whatsize/index.php on line 30
Do I have to change something in httpd.conf to allow remote file access?