Symfony:无法找到套接字传输“ http”。 [英] Symfony : Unable to find the socket transport "http"

查看:84
本文介绍了Symfony:无法找到套接字传输“ http”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试学习Symfony。因此,我已经从 symfony.com 下载了安装程序。

I'm trying to learn Symfony. So I've downloaded the installer from symfony.com.

我的 http_proxy / https_proxy 已定义,我的DNS也已定义。除非用于下载安装程序的命令 sudo curl -LsS https://symfony.com/installer -o / usr / local / bin / symfony 不起作用。

My http_proxy / https_proxy are defined, and my DNS too. Unless, the command sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony used to download the installer could not work.

现在,我想创建一个新项目,因此在我的项目文件夹中,键入 symfony新项目。如果我指定 symfony新项目2.8 symfony新项目3.0 ,也是一样。

Now, I want to create a new project, so in my project folder I type symfony new project. Same thing if I specify symfony new project 2.8 or symfony new project 3.0.

结果是错误消息:

 Downloading Symfony...

  [GuzzleHttp\Exception\RequestException]
  Error creating resource: [message] fopen(http://symfony.com/download?v=Symfony_Standard_Vendors_latest.tgz): failed to open stream: Unable to find the socket transport "http" -
   did you forget to enable it when you configured PHP?
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] Undefined variable: http_response_header
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 407

  [GuzzleHttp\Ring\Exception\RingException]
  Error creating resource: [message] fopen(http://symfony.com/download?v=Symfony_Standard_Vendors_latest.tgz): failed to open stream: Unable to find the socket transport "http" -
   did you forget to enable it when you configured PHP?
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 406
  [message] Undefined variable: http_response_header
  [file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
  [line] 407

new <directory> [<version>]

如果我执行 phpinfo(),我已经使用过openssl:

If I do a phpinfo(), I've openssl :

openssl
OpenSSL support     enabled
OpenSSL Library Version     OpenSSL 1.0.1k 8 Jan 2015
OpenSSL Header Version  OpenSSL 1.0.1k 8 Jan 2015
Openssl default config  /usr/lib/ssl/openssl.cnf 

如果我执行 php -v 的我的PHP版本:

My PHP version if I do a php -v :

PHP 5.6.17-0+deb8u1 (cli) (built: Jan 13 2016 09:10:12)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

我的问题:为什么在尝试创建新项目时会出现错误以及如何解决?是由于PHP版本引起的吗?我需要Linux软件包或其他PHP扩展吗?还有什么要配置的地方?

My question : Why is there an error when I try to create a new project and how to fix it ? Is it due to PHP version ? Do I need a linux package or an other PHP extension ? Is there anything else to configure somewhere ?

推荐答案

Arf -_-'

好吧,昨天我在这一点上被封锁了半天。那就是为什么我决定在StackOverflow上问...最后我才找到答案...

Ok, I've been blocked half a day yesterday on this point. That'why I decided to ask on StackOverflow... And Finally I just found the answer ...

git-hub Symfony-安装程序问题

我必须安装 php5-curl

apt-install install php5-curl

希望它将来至少可以帮助某个人。

Hope it could at least help someone in the future.

这篇关于Symfony:无法找到套接字传输“ http”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆