【问题标题】:Twilio SMS PHP API [duplicate]Twilio SMS PHP API [重复]
【发布时间】:2016-01-17 06:23:28
【问题描述】:
Fatal error: Uncaught exception 'Services_Twilio_TinyHttpException' with     message 'SSL certificate problem: self signed certificate in certificate chain'
in C:\a_testsms\Services\Twilio\TinyHttp.php:119 
Stack trace: #0    
C:\a_testsms\Services\Twilio.php(179): Services_Twilio_TinyHttp->__call('post', Array) #1 
C:\a_testsms\Services\Twilio.php(179): Services_Twilio_TinyHttp->post('/2010-04-01/Acc...', Array, 'From=%2B1201419...') #2 
C:\a_testsms\Services\Twilio\ListResource.php(92): Base_Services_Twilio->createData('/2010-04-01/Acc...', Array) #3 
C:\a_testsms\Services\Twilio\Rest\Messages.php(24): Services_Twilio_ListResource->_create(Array) #4
C:\a_testsms\Services\Twilio\Rest\Messages.php(71): Services_Twilio_Rest_Messages->create(Array) #5
C:\a_testsms\sendnotifications.php(49): Services_Twilio_Rest_Messages->sendMessage('+12014196393', '+67573852595', 'Hellow Test, Te...') #6
{main} thrown in C:\a_testsms\Services\Twilio\TinyHttp.php on line 119

我希望有人可以帮助我解决我遇到的上述 Twilio API (PHP) 错误。在客户完成注册过程后,我的 Web 应用程序需要发送一条短信。我下载了 Twilio PHP 帮助程序库,还为 $id 和 $token 变量创建了 PHP 脚本。我也有启用 Twilio 短信的电话号码。我似乎无法再靠自己解决这个问题了。

【问题讨论】:

    标签: php sms twilio


    【解决方案1】:

    请查看此 github 对您的问题的回复

    https://github.com/twilio/twilio-php/issues/203

    TL;DR 版本是...

    我们已从库中删除固定的证书链,因为它会在我们替换 API 服务器中的过期证书时引起问题。您需要确保您的 PHP 安装可以访问最近的 CA 证书包,以便它可以验证服务器证书。这是一个简短的概要:http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/

    【讨论】:

    • 感谢您提供的信息。解决问题后,我会调查并回复。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-28
    相关资源
    最近更新 更多