这是在Windows的命令行下用php symfony new myproject命令创建一个新的工程出现的,网上查的全部都是到php.ini中把extension=php_openssl.dll前面的“;”删掉就行了
去掉;以后是否重启php。
2、打印phpinfo() 查看openssl模块是否存在。
追答
服务器是IIS吗?IIS貌似不支持,相见 php手册file_get_contents When using SSL, Microsoft IIS will violate the protocol by closing the connection without sending a close_notify indicator. PHP will report this as "SSL: Fatal Protocol Error" when you reach the end of the data. To work around this, the value of error_reporting should be lowered to a level that does not include warnings. PHP can detect buggy IIS server software when you open the stream using the https:// wrapper and will suppress the warning. When using fsockopen() to create an ssl:// socket, the developer is responsible for detecting and suppressing this warning. 使用SSL时,微软IIS将违反协议不发送close_notify指示器关闭连接。PHP将报告为“SSL协议:致命错误当你到年底的数据。为了解决这个问题,对error_reporting值应降低到一个水平,不包括警告。PHP可以检测车的IIS服务器软件当你打开流使用HTTPS:/ /包装将抑制警告。当使用fsockopen()创建SSL:/ /插座,开发商负责检测和抑制这一警告。 修改为curl 或者 fsockopen试试!
本文解决在Windows环境下使用PHP Symfony框架创建项目时遇到的OpenSSL错误问题。文中提到修改php.ini文件配置并验证openssl模块的存在性。针对IIS服务器的问题,提供了使用curl或fsockopen作为替代方案。

1041

被折叠的 条评论
为什么被折叠?



