Composer警告:缺少openssl扩展.如何在Denwer中启用


Composer Warning: openssl extension is missing. How to enable in Denwer

我尝试安装Composer,但它返回错误:缺少openssl扩展。建议的选项是在php.ini中启用扩展。在php.ini中,字符串"extension=php_openssl.dll"未被注释掉。我用的是丹佛。我该如何解决我的问题?

根据此问题:Composer警告:缺少openssl扩展。如何在WAMP中启用WAMP(如Denwer)对Apache和CLI使用不同的php.ini(在终端中运行的php,如composer)。

只要我能看到Denwer中的php.ini文件位于"C:''WebServers''usr''local''php5''php.ini"中,默认情况下,"extension=php_openssl.dll"一行被注释(;),即使取消注释,php也不会加载openssl。

在此网站中:http://hardmandev.com/article/nastroyka-openssl-dlya-denwer/(俄语)他们提出了一种使Openssl在Denwer上工作的方法。根据评论中的反馈,这个技巧是有效的。

我希望这能帮助你。