wordpress 下载失败。没有可用的 HTTP 传输可以完成请求的请求
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27725182/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Download failed. There are no HTTP transports available which can complete the requested request
提问by Tuhin Araf
When I try to install theme on wamp server it shows a line as below Download failed. There are no HTTP transports available which can complete the requested request. How to fix it?
当我尝试在 wamp 服务器上安装主题时,它显示如下一行下载失败。没有可用的 HTTP 传输可以完成请求的请求。如何解决?
回答by RiggsFolly
I think you probably need to activate the php_curl extension to solve this issue.
我想你可能需要激活 php_curl 扩展来解决这个问题。
Do this to activate the php_curl extension :-
这样做可以激活 php_curl 扩展:-
Left click wampmanager ( thats the W icon in the system tray )
左键单击 wampmanager(即系统托盘中的 W 图标)
wampmanager -> PHP -> PHP Extensions
If the php_curl extension is not tickedthen click it and it will activate the extension and restart Apache for you.
如果没有 php_curl 扩展,ticked则单击它,它将激活扩展并为您重新启动 Apache。
It may also be necessary to activate php_opensslin the same way, depending on the theme's requirements.
php_openssl根据主题的要求,也可能需要以相同的方式激活。
回答by Shaffic Muza
Make sure that:
确保:
- allow_url_fopen = On
- Under your PHP Extensions allow php_curl
- allow_url_fopen = 开
- 在你的 PHP 扩展下允许 php_curl
Restart your Server.
重新启动您的服务器。
WordPress will try to use several transports to make the request. First it will try curl, then streams, then fsock.
WordPress 将尝试使用多种传输方式来发出请求。首先它会尝试 curl,然后是流,然后是 fsock。
If your server is set up with curl and your version of curl supports SSL (required for using the API), then it will use that.
如果您的服务器设置了 curl 并且您的 curl 版本支持 SSL(使用 API 所需),那么它将使用它。
Next it will try to use streams (fopen). If fopen is set up and working on your server, it is set to applow opening from a URL (allow_url_fopen), and openssl is set up and functional, then it will send the request with streams.
接下来它将尝试使用流(fopen)。如果 fopen 已设置并在您的服务器上运行,则将其设置为从 URL (allow_url_fopen) 中打开应用程序,并且 openssl 已设置并正常运行,然后它将使用流发送请求。
Lastly, if your server has fsockopen set up and usable, and openssl is also set up and functional, then it will use fsockopen to make the request.
最后,如果您的服务器设置了 fsockopen 并且可以使用,并且 openssl 也设置了并且可以使用,那么它将使用 fsockopen 发出请求。
If none of those work, then it will be unable to send any. This is all built into the WordPress HTTP API.
如果这些都不起作用,那么它将无法发送任何内容。这一切都内置在 WordPress HTTP API 中。
If your server can't make the requests, it will be unable to make many other requests as well.
如果您的服务器无法发出请求,它也将无法发出许多其他请求。
You need to get your host to set up a transport method that WordPress can use.
您需要让您的主机设置 WordPress 可以使用的传输方法。
回答by Smitakshi Sen
Sometimes if you face similar kind of error after trying to update any plugin or wordpress itself from localhost using your Xampp, then don't worry. You could avoid this error and update it from your localhost enabling PHP curl extension.
有时,如果您在尝试使用 Xampp 从本地主机更新任何插件或 wordpress 后遇到类似的错误,请不要担心。您可以避免此错误并从启用 PHP curl 扩展的本地主机更新它。
To enable it: 1. Open your “php.ini” file. 2. Find the line which says “;extension=php_curl.dll”. 3. Now simply remove “; or semi-colon” from the line. 4. That's it. Restart your Xampp and now it should work updating without error.
启用它: 1. 打开您的“php.ini”文件。2. 找到“;extension=php_curl.dll”这一行。3. 现在只需删除“; 或分号”从该行。4. 就是这样。重新启动您的 Xampp,现在它应该可以正常更新而不会出错。
回答by Dishan TD
Setting both of these extensions in the php.ini file worked for me:
在 php.ini 文件中设置这两个扩展对我有用:
C:\wamp\bin\php\php5.3.13
C:\wamp\bin\apache\apache2.2.22\bin
extension=php_openssl.dll
extension=php_curl.dll
回答by shrikee
You probably need to activate the php_curl extension to solve this issue as well
您可能还需要激活 php_curl 扩展来解决此问题
as uncommented the extension=php_openssl.dll in php.ini file.
取消注释 php.ini 文件中的 extension=php_openssl.dll。
Do this to uncomment the following extension:-
执行此操作以取消注释以下扩展名:-
wampicon -> php -> php.ini
wampicon -> php -> php.ini
then search the following extension in php.ini file.
然后在 php.ini 文件中搜索以下扩展名。
Hope this will help you to resolve your issues.
希望这能帮助您解决您的问题。
回答by Mayor
You will need to enable php_curl.dll from your php.ini file, this should correct the error. Just remove the ; on the line stated to correct the error.
您需要从 php.ini 文件中启用 php_curl.dll,这应该可以纠正错误。只需删除 ; 在声明纠正错误的行上。
Hope this help.
希望这有帮助。
Cheers!
干杯!

