ssl-certificate - getstream.io SSL 证书无法获取本地颁发者证书

标签 ssl-certificate laravel-5.1 getstream-io

我需要一些帮助。我正在将 getstream.io 集成到我的 laravel 应用程序 (v5.1) 中,但遇到了此错误:

cURL error 60: SSL certificate problem: unable to get local issuer certificate

这是我的代码:

use GetStream\Stream\Client;

public function index()
{

 $client = new Client('rrzp7mz8htgn', '8cgs94jg2z5da2h4q2an8q6q5vktrp8y8w7rsft3zndf63c8y9n59g2h2qvtdhqq');

 $ericFeed = $client->feed('user', 'eric');

  $data = [
    "actor"=>"eric",
    "verb"=>"like",
    "object"=>"3",
    "tweet"=>"Hello world"
  ];
  $ericFeed->addActivity($data);

}

我按照 packalyst 的以下说明进行操作

  1. 将 get-stream 添加到您的 Composer 中:

    “要求”:{ “get-stream/stream-laravel”:“~2.1” },

  2. 然后运行composer update

  3. 我还添加了提供程序和别名

    '提供商' => 数组( 'GetStream\StreamLaravel\StreamLaravelServiceProvider', ... ),

    '别名' => 数组( 'FeedManager' => 'GetStream\StreamLaravel\Facades\FeedManager', ... ),

  4. 我跑:

    php artisan 供应商:publish --provider="GetStream\StreamLaravel\StreamLaravelServiceProvider"

  5. 我已经通过电子邮件发送给 getstream.io,但尚未回复。当我收到他们的一些答复时,我会更新这篇文章。

我也检查了 laracast 的这篇文章,但没有答案。 https://laracasts.com/discuss/channels/general-discussion/activity-feeds-with-getstreamio?page=0

最佳答案

Getstream.io 回复了我的电子邮件并为我提供了帮助,这是解决方案,

the SSL error message it’s usually related to using old certificate key chains with CURL. This is unfortunately quite of a common issue with CURL and SSL, I suggest you to try the solution suggested in this thread: Paypal Access - SSL certificate: unable to get local issuer certificate

这就是我所做的:

  1. 从上面的链接curl.haxx.se/ca/cacert.pem下载cacert.pem并将其保存到c:/wamp/bin/php/php5.5.12/cert/

  2. 单击我的 wamp 图标,导航至 PHP > php.ini

  3. 添加以下行并单击“保存”。

    curl.cainfo=c:/wamp/bin/php/php5.5.12/cert/cacert.pem

  4. 重新启动 wamp 就可以了。成功了

希望这可以帮助其他使用 getstream.io 的开发人员。感谢 getstream.io 的 Tommaso。

关于ssl-certificate - getstream.io SSL 证书无法获取本地颁发者证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33958930/

相关文章:

javascript - 无法发布到 GetStream 中的摘要组

php - 使用 Laravel 更新嵌套数组

javascript - 隐身灯塔性能问题

angular - 您正在公开分享您的 App Secret。不要在浏览器中暴露 App Secret : error while calling getStream API from Angular

linux - 如何向自签名 CA 证书文件添加注释?

php - 如何访问与另一表相关的一列 Laravel 5.1

javascript - 在 dropzone 文件上传时显示成功/错误消息

php - 为 SSL 设置 cURL

java - 连接到 LDAPS(Active Directory) 时发生 SSLHandshakeException

web-services - SSL 或代码签名证书