Composer Warning: openssl extension is missing. How to enable in WAMP(Composer 警告:缺少 openssl 扩展.如何在 WAMP 中启用)
问题描述
尝试通过 Win7/64 + WampServer 2.2 安装 Composer 依赖管理工具Setup Installer 我收到以下消息:
Trying to install Composer dependency management tool on Win7/64 + WampServer 2.2 via the Setup Installer and I am getting the following message:
缺少 openssl 扩展,会降低 Composer 的安全性和稳定性.如果可能,您应该启用它或使用 --with-openssl 重新编译 php
The openssl extension is missing, which will reduce the security and stability of Composer. If possible you should enable it or recompile php with --with-openssl
所以这就是我所做的......
So here is what I did...
- 从我的托盘中的 Wamp 图标,单击
php >php 扩展 >php_openssl - 这表明通过在扩展程序旁边放置一个复选标记来完成任务
- 然后我重新启动了 WampServer
- 然后从托盘中的 Wamp 图标,我点击
php >php.ini并搜索 openssl 以验证它没有被注释掉).不是. - 然后我回到 Composer-Setup.exe 并再次尝试.相同的警告消息:缺少 openssl 扩展"
- 从未使用过 OpenSSL,我不确定应该设置什么,因此我尝试使用 https 浏览到我的本地站点之一.失败了.
- From my Wamp icon in Tray, clicked
php > php extensions > php_openssl - This showed that task was completed by placing a check mark beside the extension
- I then restarted WampServer
- Then from the Wamp icon in tray, I clicked
php > php.iniand searched for openssl to verifiy it was NOT commented) out. It was not. - I then went back to Composer-Setup.exe and tried again. Same Warning Message: "openssl extension is missing"
- Having never worked with OpenSSL, I'm not sure what is supposed to be set, so I tried to browse to one of my local sites using https. It Failed.
我错过了什么?
请指教.
推荐答案
WAMP 在 CLI 和 Apache 中使用不同的 php.ini 文件.当您通过 WAMP UI 启用 php_openssl 时,您为 Apache 启用它,而不是为 CLI 启用它.您需要修改 C:wampinphpphp-5.4.3php.ini 为 CLI 启用它.
WAMP uses different php.ini files in the CLI and for Apache. when you enable php_openssl through the WAMP UI, you enable it for Apache, not for the CLI. You need to modify C:wampinphpphp-5.4.3php.ini to enable it for the CLI.
这篇关于Composer 警告:缺少 openssl 扩展.如何在 WAMP 中启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Composer 警告:缺少 openssl 扩展.如何在 WAMP 中启用
基础教程推荐
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
