我使用api解析xml,每隔30分钟用cronjob解析xml, 我突然发现我无法再连接到服务器了。 我的测试得到了这个错误:
failed to open stream HTTP request failed
我做了什么:
contact to server provider -> they have no idea
ping to server -> works fine
check by file_get_contents('http://ip.xx/ and http://domian.xx') -> the same error
checked with curl -> still no success
check from localhost -> everything work fine
used get_headers() -> no luck
used gethostbyname('domain') -> successful returns ip
checked allow_url_fopen -> is 1
checked file_get_content through other random domains -> work
changed dns settings in resolve.conf from default to publick -> no luck
disabled directadmin csf -> nothing changed
a也使用了这段代码
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_HEADER => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_NOBODY => true));
$header = explode("\n", curl_exec($curl));
curl_close($curl);
它返回
Array (
[0] => HTTP/1.1 200 OK
[1] => Date: Sun, 10 Aug 2014 08:42:07 GMT
[2] => Server: Apache/2
[3] => X-Powered-By: PHP/5.4.24
[4] => Cache-Control: no-cache
[5] => Pragma: no-cache
[6] => Set-Cookie: irsp_admin_sessionhash=eb1aeff7a65ff9bfde01658804a56245; path=/; domain=.87.107.52.147
[7] => Set-Cookie: irsp_user_sessionhash=b8878e85b41e47bbcf162c7a74a4f4f6; path=/; domain=.87.107.52.147
[8] => Set-Cookie: irsp_invalidsignin=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.87.107.52.147
[9] => Vary: User-Agent
[10] => Content-Type: text/html
[11] =>
[12] => )
最后我改变了我们服务器的IP地址 - >没有变化(它从xxx.xx.xxx.48变为xxx.xx.xxx.49)
然而,该服务器上有一个目录,它有一个不同的作业(http // ip ** / api **)我可以连接到那个
服务器信息是:
第5.3.24节 Apache 2.2.22
任何建议?
答案 0 :(得分:0)
ip link set dev venet0:0 mtu 1350