Symfony:无法找到套接字传输 "http"
Symfony : Unable to find the socket transport "http"
我正在努力学习 Symfony。所以我从 symfony.com.
下载了安装程序
我的 http_proxy
/ https_proxy
已定义,我的 DNS 也已定义。除非,用于下载安装程序的命令sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
无法运行。
现在,我想创建一个新项目,因此在我的项目文件夹中键入 symfony new project
。如果我指定 symfony new project 2.8
或 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 :
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 扩展?还有什么地方可以配置吗?
阿尔夫-_-'
好的,我昨天在这一点上被屏蔽了半天。这就是为什么我决定在 Whosebug 上提问...最后我找到了答案...
git-hub Symfony-installer issues
我必须安装 php5-curl
。
apt-get install php5-curl
希望它至少能对以后的人有所帮助。
我正在努力学习 Symfony。所以我从 symfony.com.
下载了安装程序我的 http_proxy
/ https_proxy
已定义,我的 DNS 也已定义。除非,用于下载安装程序的命令sudo curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony
无法运行。
现在,我想创建一个新项目,因此在我的项目文件夹中键入 symfony new project
。如果我指定 symfony new project 2.8
或 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 :
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 扩展?还有什么地方可以配置吗?
阿尔夫-_-'
好的,我昨天在这一点上被屏蔽了半天。这就是为什么我决定在 Whosebug 上提问...最后我找到了答案...
git-hub Symfony-installer issues
我必须安装 php5-curl
。
apt-get install php5-curl
希望它至少能对以后的人有所帮助。