突然,我开始收到以下错误:
[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 );发布于 2013-10-13 01:58:54
这似乎是操作系统的一些严重问题。在apache error.log中找出何时开始出现这些错误。然后在系统日志(在windows事件查看器上,在linux /var/log/syslog上)中查找之前发生的事情。
https://stackoverflow.com/questions/19336749
复制相似问题