小皮(phpstudy)面板环境中,phpstorm命令行执行Composer需要开启openssl拓展才能使用的巨坑,

跟标题有同样环境的旁友可以继续看,百度有一大把教你如何开启openssl,什么去分号啦,下载ca证书啦...通通操作后还是抛出异常:

[Composer\Exception\NoSslException]

The openssl extension is required for SSL/TLS protection but is not available.
 If you can not enable the openssl ex tension, you can disable this error, 
at your own risk, by setting the 'disable-tls' option to true.

啥原因百度有大把,这里提示说执行

composer config -g -- disable-tls true

可以解决问题,然!并!卵!执行过后依然抛出上面的异常

治标不治本解决方案:

C:\Users\Administrator\AppData\Roaming\Composer找到config,json文件,直接修改

"disable-tls": true,

尝试行不行,如果还不行

解决方案2:

各种修改配置文件后,不使用phpstorm自带的命令行工具执行composer命令,使用小皮面板自带的composer命令行工具

原来坑都是phpstorm引起的

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章