discuz上的 关于环境配置打开了allow_url_fopen而无法采集的问题 近日发现有些用户PHP配置环境中支持file_get_contents、file、fopen打开远程url时总是报 引用: Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /usr/vogue/upload/1.php on line 4 Warning: file_get_contents(http://blog.sina.com.cn/myblog/index_rss.php?uid=1190363061) [function.file-get-contents]: failed to open stream: Connection refused in /usr/vogue/upload/1.php on line 4这个错误,经过排查后发现这是服务器的DNS出问题,造成了路由结果中有部份路由执行超时,最终PHP执行时间超时导致采集与RSS导入用到这类型的函数取不到内容而无法使用此项功能。 如有遇到此类问题的朋友可以查一下环境是否开启了allow_url_fopen并在服务器上跟踪一下路由是否有断网的节点存在。如果存在可以更换快一点的DNS,解决了路由问题,以上问题同样就不存在了。
routetrace的结果是没有问题的.不知道是怎么回事.
failed to open stream:connection refused. 连接被据绝可以socket一个连接看看行不行,看看行不行或者管道连连看看!首要要保证一个连接,如果通了,再请求看看!
关于环境配置打开了allow_url_fopen而无法采集的问题
近日发现有些用户PHP配置环境中支持file_get_contents、file、fopen打开远程url时总是报
引用: Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /usr/vogue/upload/1.php on line 4 Warning: file_get_contents(http://blog.sina.com.cn/myblog/index_rss.php?uid=1190363061)
[function.file-get-contents]: failed to open stream: Connection refused in /usr/vogue/upload/1.php on line 4这个错误,经过排查后发现这是服务器的DNS出问题,造成了路由结果中有部份路由执行超时,最终PHP执行时间超时导致采集与RSS导入用到这类型的函数取不到内容而无法使用此项功能。 如有遇到此类问题的朋友可以查一下环境是否开启了allow_url_fopen并在服务器上跟踪一下路由是否有断网的节点存在。如果存在可以更换快一点的DNS,解决了路由问题,以上问题同样就不存在了。