|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-30 16:24 UTC] iliaa@php.net
[2007-12-30 18:31 UTC] php at xuefeng dot org
[2008-01-28 23:54 UTC] tony2001@php.net
[2008-02-05 01:00 UTC] php-bugs at lists dot php dot net
[2009-04-08 05:38 UTC] bole dot chen at gmail dot com
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
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)