Home  >  Article  >  Backend Development  >  Solve the problem of SSL error when running php Composer under Win7

Solve the problem of SSL error when running php Composer under Win7

WBOY
WBOYOriginal
2016-08-08 09:22:401089browse

Reposted from: http://my.oschina.net/yearnfar/blog/346727

I tried to run composer under win7 today but an SSL error occurred:

?

12 34567891011121314D:datawwwmmoyusymapp>php -f %phprc%composer installLoading composer repositories with package information   [ComposerDownloaderTransportException]  The "https://packagist.org/packages.json" file could not be downloaded: SSL   operation failed with code 1. OpenSSL Error messages:  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify  failed  Failed to enable crypto  failed to open stream: operation failed install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]

 

Result from not installing the CA certificate! ! !

CACertificateDownload address: http://curl.haxx.se/docs/caextract.html

Then modify the php.ini file

?

1 openssl.cafile= D:/wamp/php/verify/cacert.pem

It’s OK~

The above introduces how to solve the problem of SSL error when running php Composer under Win7, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn