简体   繁体   English

PHP警告:get_headers():php_network_getaddresses:getaddrinfo失败:file.php中的系统错误

[英]PHP Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: System error in file.php

Suddenly I start getting the following error: 突然我开始出现以下错误:

[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

line 70 70行

$header = get_headers($link);

I can guess php hit some kind of limit, but i'm not sure what. 我可以猜到php达到了某种极限,但是我不确定。 I tried increasing max client limit in apache, also tried upgrading php to 5.5. 我尝试在apache中增加最大客户端限制,也尝试将php升级到5.5。

also tried changing get_headers to 还尝试将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 );

That seems to be some serious problems with OS. 这似乎是OS的一些严重问题。 Find out in apache error.log when these error start to appear. 这些错误开始出现时,请在apache error.log中查找。 And then find in system logs (on windows Event viewer, on linux /var/log/syslog) what happened before. 然后在系统日志中(在Windows事件查看器上,在Linux / var / log / syslog上)查找以前发生的情况。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM