Php 创建资源时出错:[message]fopen():找不到包装器";https";在Ubuntu上使用Symfony
我试图在Ubuntu 17.04计算机上安装Symfony3,但出现错误:Php 创建资源时出错:[message]fopen():找不到包装器";https";在Ubuntu上使用Symfony,php,symfony,ubuntu,ssl,ubuntu-17.04,Php,Symfony,Ubuntu,Ssl,Ubuntu 17.04,我试图在Ubuntu 17.04计算机上安装Symfony3,但出现错误: [GuzzleHttp\Ring\Exception\RingException] Error creating resource: [message] fopen(): Unable to find the wrapper "htt ps" - did you forget to enable it when you configured
[GuzzleHttp\Ring\Exception\RingException]
Error creating resource: [message] fopen(): Unable to find the wrapper "htt
ps" - did you forget to enable it when you configured PHP?
[file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/S
treamHandler.php
[line] 406
[message] fopen(https://get.symfony.com/symfony.version): failed to open st
ream: No such file or directory
[file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/S
treamHandler.php
[line] 406
[message] Undefined variable: http_response_header
[file] phar:///usr/local/bin/symfony/vendor/guzzlehttp/ringphp/src/Client/S
treamHandler.php
[line] 407
运行symfony new
命令时。我正在运行PHP版本7.19和OpenSSL版本1.1.0f。我也尝试过OpenSSL版本1.0.2g(Ubuntu软件包管理器提供的版本),同样的错误也发生了。我还尝试过使用openssl[=DIR]标志从源代码处安装PHP,该标志指向未经修改的PHP源代码中的SSL目录,但尽管这样做没有错误,但没有任何帮助
我看过这样的答案:
但它们都是针对Windows的(告诉我取消对php.ini中的.dll的注释,这在Ubuntu上不起作用),或者它们告诉我安装一个PHP5包,比如php53 opensll
,它在这个系统上不起作用
phpinfo()的输出包括:
OpenSSL support disabled (install ext/openssl)
在Phar:PHP归档支持
一节中,如果这确实是问题所在,我不确定正确的流程是否能够正确地在Phar中启用支持
非常感谢您的建议。您必须在php.ini配置中启用openssl扩展。找到它(加载ini文件的顶部显示的
phpinfo()
输出)并添加(或取消注释,如果存在)
除了其他模块声明之外。现在就开始尝试。出于兴趣,您是如何发现.so文件的正确名称的?我到处找,甚至试着把.dll扩展名改成.所以…好吧,我这么做了,重新启动了nginx,但仍然会遇到同样的错误。唯一的区别是,当尝试访问我的index.php文件时,nginx现在显示的是“502坏网关”,而不是phpinfo详细信息。
module=openssl.so