php - PodioConnectionError for localhost using PHP client library
问题描述
I used OpenSSL to generate an SSL Certificate for my localhost, but the self-signed certificate seems to be causing problems when authenticating with Podio:
Fatal error: Uncaught PodioConnectionError: Connection to Podio API failed: [60] SSL certificate problem: self signed certificate in certificate chain
I tried downloading cacert.pem
and adding it to my php.ini file curl.cainfo=<path-to>cacert.pem
, but after restarting the server, I still get the same error.
With some other library's I've had to set CURLOPT_SSL_VERIFYPEER
, but I'm not sure how I would do that anyway using the Podio PHP client library...
Any tips on debugging this error?
解决方案
我发现了在使用 Podio PHP 客户端库时如何设置 CURLOPT_SSL_VERIFYPEER => false :
$options = array('curl_options' => array(CURLOPT_SSL_VERIFYPEER => false));
Podio::setup($client_id, $client_secret, $options);
现在我只需要记住在生产中删除它......
推荐阅读
- vba - 创建文件的硬拷贝并保持原始文件不变
- sql - PostgreSQL sum(count > 0 时的情况)在分区每周和每小时的问题
- c++ - 在回调中使用函数时 C++ 未知覆盖说明符
- node.js - NPM 在命令提示符下挂起,但在 powershell 上工作
- angular - 在 TypeScript 中复制 JS 的 nextUntil
- python - 在 gtk for vlc 中实现搜索器的最佳方法
- c# - C# 将 json 序列化为类
- android - 从另一个 Fragment 在 Fragment 的选项卡视图中设置选项卡位置
- php - Laravel 登录后将用户重定向到原始目的地
- r - 两个样本(不等方差)韦尔奇 t 检验的统计功效和样本量确定?