加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – Symfony:无法找到套接字传输“http”

发布时间:2020-12-13 14:12:43 所属栏目:PHP教程 来源:网络整理
导读:我正在努力学习Symfony.所以我从 symfony.com下载了安装程序. 我的http_proxy / https_proxy已经定义,我的DNS也是.除非,用于下载安装程序的命令sudo curl -LsS https://symfony.com/installer -o /usr/local / bin / symfony无法正常工作. 现在,我想创建一个
我正在努力学习Symfony.所以我从 symfony.com下载了安装程序.

我的http_proxy / https_proxy已经定义,我的DNS也是.除非,用于下载安装程序的命令sudo curl -LsS https://symfony.com/installer -o /usr/local / bin / symfony无法正常工作.

现在,我想创建一个新项目,所以在我的项目文件夹中输入symfony new project.如果我指定symfony新项目2.8或symfony新项目3.0同样的事情.

结果是一条错误消息:

Downloading Symfony...

  [GuzzleHttpExceptionRequestException]
  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

  [GuzzleHttpRingExceptionRingException]
  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
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版本,如果我做一个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扩展吗?在某处配置还有什么吗?

Arf -_-‘

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

git-hub Symfony-installer issues

我不得不安装php5-curl.

apt-get install php5-curl

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读