当前位置:Gxlcms > PHP教程 > 解决Win7下运行phpComposer出现SSL报错的问题

解决Win7下运行phpComposer出现SSL报错的问题

时间:2021-07-01 10:21:17 帮助过:19人阅读

转自:http://my.oschina.net/yearnfar/blog/346727

今天尝试在win7下运行composer却出现SSL报错:

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

D:\data\www\mmoyu\symapp>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文件

?

1

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

就OK了~

以上就介绍了解决Win7下运行php Composer出现SSL报错的问题,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

人气教程排行