最近服务器运行生成静态页面的程序,总是报错,错误信息如下:
引用
Warning:  file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /data/www/vhost/5217u/plug-in/404/404.php on line 68



Warning:  file_get_contents(http://www.5217u.com/news/detail.php?id=6) [function.file-get-contents]: failed to open stream: Invalid argument in /data/www/vhost/5217u/plug-in/404/404.php on line 68

经查资料,发现错误是DNS的问题,域名无法解析,上服务器ping www.5217u.com得到错误信息,域名无法解析或者域名不存在,马上去查看resolv.conf,看到配置正确。
引用
domain  bizeway.com
nameserver      202.96.209.5
nameserver      202.96.209.133

但是在服务器上ping www.5217u.com就是不正常解析,在本地ping可以正常解析,经朋友了解,上海电信的域名服务器做了调整,对一部分ip不提供DNS服务了,原来问题出在电信。
后将配置文件修改如下:
引用
domain  bizeway.com
nameserver      202.96.209.133
nameserver      202.96.209.5

一切回复正常,希望大家以后再碰到“php_network_getaddresses: getaddrinfo failed: hostname nor servname provided”错误,不要动不动就去看程序哪里错了,换个DNS就好了。

PHP | 评论(2) | 引用(0) | 阅读(14982)
dfd
2008/04/30 17:20
ghg
分页: 1/1 第一页 1 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]