您好,欢迎访问一九零五行业门户网

wamp环境下运行composer的坑

下面由composer使用教程栏目为大家介绍wamp环境下运行composer的坑的解决办法,希望对需要的朋友有所帮助。
今天在用composer安装laravel时报错
the openssl extension is required for ssl/tls protection but is not availab le. if you can not enable the openssl extension, you can disable this error , at your own risk, by setting the 'disable-tls' option to true.
网上说是openssl没有打开的问题,打开php.ini,启用插件并设置相应的证书,然后重启apache。
理论上来说,走到这一步应该没什么问题了,phpinfo();里也有openssl的扩展,但是报错依旧。
研究后发现,composer判断openssl的依据是:当前环境变量下的php目录下的php.ini文件,但是wamp下php.ini文件实际上对应的是php目录下的phpforapache.ini而不是php.ini,所以把phpforapache.ini里的内容全部复制到php.ini,再次运行composer install就没有报错了。
以上就是wamp环境下运行composer的坑的详细内容。
其它类似信息

推荐信息