ID: 43687
User updated by: php at xuefeng dot org
Reported By: php at xuefeng dot org
-Status: Feedback
+Status: Open
Bug Type: Network related
Operating System: Redhat 2.6.9-42.ELsmp #1 SMP i68
PHP Version: 5.2.5
New Comment:
defined via DNS entry .
Previous Comments:
------------------------------------------------------------------------
[2007-12-30 16:24:38] [EMAIL PROTECTED]
Is the xxx.xxx.com domain defined via DNS entry or via a local hosts
file?
------------------------------------------------------------------------
[2007-12-27 09:29:26] php at xuefeng dot org
Description:
------------
When trying to resolv the ip address of a hostname given in /etc/hosts,
it's works fine, but does not work when trying to resolv via the DNS
server though.
btw: those test code works fine with php 5.2.1
Reproduce code:
---------------
var_dump(dns_get_record("xxx.xxx.com"));
var_dump(fsockopen("xxx.xxx.com", 80, $error, $errstr));
Expected result:
----------------
array(1) {
[0]=>
array(5) {
["host"]=>
string(12) "xxx.xxx.com"
["type"]=>
string(1) "A"
["ip"]=>
string(13) "192.168.200.6"
["class"]=>
string(2) "IN"
["ttl"]=>
int(86400)
}
}
resource(20) of type (stream)
Actual result:
--------------
array(1) {
[0]=>
array(5) {
["host"]=>
string(12) "xxx.xxx.com"
["type"]=>
string(1) "A"
["ip"]=>
string(13) "192.168.200.6"
["class"]=>
string(2) "IN"
["ttl"]=>
int(86400)
}
}
<br />
<b>Warning</b>: fsockopen() [<a
href='function.fsockopen'>function.fsockopen</a>]:
php_network_getaddresses: getaddrinfo failed: Temporary failure in name
resolution in
<b>/opt/wwwroot/qun_inner/modules/club/my_signatures.php</b> on line
<b>68</b><br />
<br />
<b>Warning</b>: fsockopen() [<a
href='function.fsockopen'>function.fsockopen</a>]: unable to connect to
xxx.xxx.com:80 (Unknown error) in
<b>/opt/wwwroot/qun_inner/modules/club/my_signatures.php</b> on line
<b>68</b><br />
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43687&edit=1