標籤:
以前都在linux環境使用php composer。今天嘗試在win7下運行composer卻出現SSL報錯:
D:\data\www\mmoyu\symapp>php -f %phprc%\composer installLoading composer repositories with package information [Composer\Downloader\TransportException] 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]
沒有安裝CA認證導致的!!!
CA認證:http://curl.haxx.se/docs/caextract.html
然後修改php.ini檔案
?
1 |
openssl.cafile= D: /wamp/php/verify/cacert .pem |
就OK了~
轉載:http://my.oschina.net/yearnfar/blog/346727
解決Win7下運行php Composer出現SSL報錯的問題