SSL证书错误:通过Podio进行身份验证时无法获取本地颁发者证书 [英] SSL certificate error: unable to get local issuer certificate when authenticating with Podio

查看:189
本文介绍了SSL证书错误:通过Podio进行身份验证时无法获取本地颁发者证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试首次使用Podio API,并试图在

I am trying to use the Podio API for the first time, and am trying to run the Hello World script on this page, but I keep getting this error:

这是我的代码:

<?php
require_once './vendor/podio/podio-php/PodioAPI.php';

$client_id = "<my_id>";
$client_secret = "<my_secret>";
$app_id = "<my_app_id>";
$app_token = "<my_app_token>";

Podio::setup($client_id, $client_secret);
Podio::authenticate_with_app($app_id, $app_token);
$items = PodioItem::filter($app_id);

print "My app has ".count($items)." items";
?>

当我注释掉最后三行并运行时:

When I comment out the last three lines and just run this:

<?php
require_once './vendor/podio/podio-php/PodioAPI.php';

$client_id = "<my_id>";
$client_secret = "<my_secret>";
$app_id = "<my_app_id>";
$app_token = "<my_app_token>";

Podio::setup($client_id, $client_secret);

?>

代码运行没有错误,因此使我相信这是应用程序令牌的问题,但是我通过遵循

The code runs without errors, So that leads me to believe that it is a problem with the app token, but I got the app token by following these instructions

这是怎么了?

当我获得api密钥时,我输入了一个伪造的url,因为我正在计算机上运行此测试.可能是问题所在吗?

When I got my api key, I put in a fake url, because I am running this test my computer. Could that be the issue?

推荐答案

我通过从此站点

I solved this by downloading cacert.pem from this site https://curl.haxx.se/docs/caextract.html into my C:\xampp\php directory. I then uncommented/edited these lines in my php.ini file

curl.cainfo = "C:\xampp\php\cacert.pem" 
openssl.cafile="C:\xampp\php\cacert.pem"

这篇关于SSL证书错误:通过Podio进行身份验证时无法获取本地颁发者证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆