【问题标题】:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed using xampp on macSSL3_GET_SERVER_CERTIFICATE:证书验证在 mac 上使用 xampp 失败
【发布时间】:2017-06-25 03:17:33
【问题描述】:

希望每个人都做得很好。使用 laravel 创建新项目时出现 SSL 错误。这是我的错误:

[Composer\Downloader\TransportException]                                     
  The "http://packagist.org/p/laravel/laravel$745fa4e5f0a1485878f0b4c5be5cf26  
  a9e5d68243751f3c34acbd8bf3766065d.json" file could not be downloaded: SSL o  
  peration 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  

对于这个问题,我正在尝试多种解决方案,但结果仍然为零。我想分享一种用于 SSL 问题的方法。我在某个网站上得到了下面的方法,在 php.ini 文件中添加下面代码的人指南在哪里。

[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
curl.cainfo ="/Applications/XAMPP/xamppfiles/etc/cacert.pem"

[openssl]
; The location of a Certificate Authority (CA) file on the local filesystem
; to use when verifying the identity of SSL/TLS peers. Most users should
; not specify a value for this directive as PHP will attempt to use the
; OS-managed cert stores in its absence. If specified, this value may still
; be overridden on a per-stream basis via the "cafile" SSL stream context
; option.
openssl.cafile="/Applications/XAMPP/xamppfiles/etc/cacert.pem"

但是这种方法也行不通。谁能帮我解决这个问题。谢谢

【问题讨论】:

    标签: php laravel ssl xampp


    【解决方案1】:

    运行该命令并解决您的问题,我自己修复了它

    curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer 
    

    我也在 MacOs sierra 上使用 PHP 5.6.24

    【讨论】:

      猜你喜欢
      • 2015-01-05
      • 2016-07-28
      • 2015-04-30
      • 2015-11-19
      • 1970-01-01
      • 1970-01-01
      • 2015-08-19
      • 2016-12-08
      相关资源
      最近更新 更多