Wordpress wp_remote_post()给出“cURL错误6:无法解析主机” [英] Wordpress wp_remote_post() gives "cURL error 6: Could not resolve host"
问题描述
{errors:{http_request_failed:[cURL error 6 :无法解析主机:subdomain.example.com]},error_data:[]}
当我从那台机器手动运行curl时,我只需要html作为一个响应。由于它表示无法解析主机,我认为问题出现在域名解析为ip之前。所以我猜(但不确定)这与DNS有关系。
我真的不明白这里可能有什么问题,或者我可以调试这个。有人有建议吗?
欢迎所有提示!
您可能需要更新您的dist
sudo apt-get update
/ pre>
sudo apt-get dist-upgrade
这固定了我的卷曲问题
更新
您将需要了解dist升级步骤,一些软件包 - 例如php - 在更新期间将提示您询问你要更换配置文件,你必须非常了解你在做什么,保存这些文件或替换新的-default文件。
Since this morning some function in a wordpress site I'm managing is not working anymore. I syslogged the response from it, which gives me:
{"errors":{"http_request_failed":["cURL error 6: Could not resolve host: subdomain.example.com"]},"error_data":[]}
When I manually run curl from that machine I simply get the html as a response. Since it says it could not resolve the host, I presume the problem occurs before the domain name can be resolved to an ip. So I guess (but not sure) this has something to do with the DNS.
I really don't understand what could be wrong here or how I can debug this. Does anybody have a suggestion?
All tips are welcome!
解决方案as mentioned here and due to this USN:
you will may need to update your dist
sudo apt-get update sudo apt-get dist-upgrade
this fixed my issue with curl
Update
you will need to be aware of the dist-upgrade step, some packages -such as php- during the updrage will prompt you to ask you wether you want to replace the configuration files , you must be very aware of what you are doing here , keeping those files or replacing with the new -default- files.
这篇关于Wordpress wp_remote_post()给出“cURL错误6:无法解析主机”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!