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?
PHP fopen() error...
Moderator: General Moderators
Re: PHP fopen() error...
The first one should never work.
Whether the second one does depends on what $url is and potentially whether you have the allow_url_fopen setting enabled (though when turned off you'd probably get a different error message). What are their values?
Whether the second one does depends on what $url is and potentially whether you have the allow_url_fopen setting enabled (though when turned off you'd probably get a different error message). What are their values?