关于composer拉取报错的问题(ssl错误)

错误信息:

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

由于我电脑上装了好几个PHP,以至于我忘记了我的composer是装在哪个PHP上了。。所以我逐个修改了我的php.ini里的extension=php_openssl.dll ,但还是没有解决这个问题
后来我打开composer的环境变量,找到了安装目录,里面是一个bat文件处理的,打开后发现他是通过PHP的环境变量来处理数据的,我通过环境变量找到了PHP的安装目录。。算是饶了个弯子。。
然后又修改了一次发现还是没反应,晕倒,百度了一下,里面有个配置项extension_dir = "./"需要修改成extension_dir = “ext”,因为dll在这个文件夹下面,如果里面有配置了直接去掉前面分号就好了,然后重新尝试了一下问题解决。

猜你喜欢

转载自blog.csdn.net/xiechungui/article/details/83894180