【问题标题】:PHP Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in file.phpPHP警告:get_headers():php_network_getaddresses:getaddrinfo失败:file.php中的系统错误
【发布时间】:2013-10-12 16:53:06
【问题描述】:

我突然开始收到以下错误:

[Sat Oct 12 19:46:55.709527 2013] [:error] [pid 30600] [client x.x.x.x:56170] PHP Warning:  get_headers(): php_network_getaddresses: getaddrinfo failed: System error in file.php on line 70, referer: http://domain.com

第 70 行

$header = get_headers($link);

我可以猜测 php 达到了某种限制,但我不确定是什么。我尝试在 apache 中增加最大客户端限制,还尝试将 php 升级到 5.5。

还尝试将 get_headers 更改为

$curl = curl_init();
curl_setopt_array( $curl, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_URL => $link ) );
curl_exec( $curl );
$code = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
curl_close( $curl );

【问题讨论】:

    标签: php apache networking get http-headers


    【解决方案1】:

    这似乎是操作系统的一些严重问题。当这些错误开始出现时,请在 apache error.log 中查找。然后在系统日志中(在 windows 事件查看器上,在 linux /var/log/syslog 上)找到之前发生的事情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-06-07
      • 1970-01-01
      • 2017-05-12
      • 2015-07-29
      • 2012-11-03
      • 2015-11-12
      • 1970-01-01
      相关资源
      最近更新 更多