【问题标题】:How to resolve SSL certificate error in ubuntu如何解决 ubuntu 中的 SSL 证书错误
【发布时间】:2016-06-13 12:16:58
【问题描述】:

我正在使用以下 Twilio API 发送短信,并且我已经查看了代码 它在其他操作系统上运行良好。我还查看了以下堆栈链接 Twilio PHP - SSL certificate: self signed certificate in certificate chain 不幸的是它是为了 windows系统,我用的是ubuntu。

用于发送 SMS 的 API。

require_once('twilo/Services/Twilio.php');

$number='+91xxxxxxx';
$code='abc';

$sid = "xxxxxxxxxxxxxxxx"; // Your Account SID from www.twilio.com/user/account
$token = "xxxxxxxxxxxxxxxx"; // Your Auth Token from www.twilio.com/user/account

$client = new Services_Twilio($sid, $token);
$message = $client->account->messages->sendMessage(
    '+1 xxx-xxx-xxxx', // From a valid Twilio number
    $number, // Text this number
    $code
);

echo $message->sid;

但是当我在 Ubuntu 上使用它时,它给了我以下错误:

带有消息的未捕获异常“Services_Twilio_TinyHttpException” 'SSL证书问题:证书中的自签名证书 链。

【问题讨论】:

标签: php ubuntu ssl twilio


【解决方案1】:

这里是 Twilio 开发者宣传员。

这往往是因为您使用的是过时版本的 libcurl。我建议您查看FAQ here in the documentation for the Twilio PHP library 并按照其中列出的步骤进行操作。

让我知道这是否有帮助。

【讨论】:

  • 嗨,philnash,我查看了上述内容,但它并没有解决我的问题。
  • 你是说你的服务器上有最新版本的 libcurl 吗?
猜你喜欢
  • 2016-12-07
  • 1970-01-01
  • 2020-09-14
  • 1970-01-01
  • 1970-01-01
  • 2019-10-07
  • 1970-01-01
  • 2022-11-11
  • 2015-09-07
相关资源
最近更新 更多