Errors in installing php composer on windows

﹥>﹥吖頭↗ 提交于 2019-12-20 06:30:18

问题


While installing the composer to user the laravel framework, I got some errors :

Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed
Download failed: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
file_get_contents(): Failed to enable crypto
file_get_contents(https://getcomposer.org/composer.phar): failed to open stream: operation failed
The download failed repeatedly, aborting.

I'm sure that the Openssl in php.ini is enable.


回答1:


Having the OpenSSL extension enabled does not mean it is configured correctly.

It fails to validate the certificate for getcomposer.org. That means either some man-in-the-middle server messes with your request or you somehow did not configure the set of default CA Authorities. Your server operator can tell you more.




回答2:


I have the same problem using wamp on windows 7, and I already enabled the openssl.dll in php.ini, still report the same error. my problem is caused by the network provider,and I have no idea what's wrong with the them. after I connect to a VPN network .it works like a charm.



来源:https://stackoverflow.com/questions/23900656/errors-in-installing-php-composer-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!