小皮(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引起的

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