月度归档:2016年02月

解决运行php composer出现SSL报错的问题

c:\>php -f %phprc%\composer install
Loading 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-p
lugins] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--ver
bose] [-o|--optimize-autoloader]

没有安装CA证书导致的,CA证书下载地址:

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

然后修改php.ini文件

openssl.cafile= D:/xampp/php/verify/cacert.pem

问题解决。