PHP fopen() error...
Posted: Thu Oct 04, 2012 12:58 pm
So, I'm stumped.
I have 2 servers with the exact same code. One works and the other does not. What is not working in particular is:
$file = fopen("../index.php?a=1", 'r');
$file = fopen($url, 'r' );
I get an error on saying:
Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/test.php line 4
I did some searching around and saw that it could be a dns issue - since one version of the code works and one doesn't this could be the case. Any ideas?
I have 2 servers with the exact same code. One works and the other does not. What is not working in particular is:
$file = fopen("../index.php?a=1", 'r');
$file = fopen($url, 'r' );
I get an error on saying:
Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/test.php line 4
I did some searching around and saw that it could be a dns issue - since one version of the code works and one doesn't this could be the case. Any ideas?