给php添加ssl证书
2016-02-22 14:48 斌哥tobin 阅读(5188) 评论(0) 编辑 收藏 举报composer下载时报错:
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
解决办法:
这是因为连接packagist.org需要ssl证书,给php配置默认ssl证书可以解决
下载证书 http://curl.haxx.se/ca/cacert.pem
修改php.ini
curl.cainfo=/etc/ssl/certs/cacert.pem
openssl.cafile=/etc/ssl/certs/cacert.pem
openssl.capath=/etc/ssl/certs
必须已启用openssl, curl扩展