【问题标题】:Error on 'createSession' (OpenTok php sdk)“createSession”错误(OpenTok php sdk)
【发布时间】:2018-07-10 01:01:38
【问题描述】:

OpenTok 有一个“小”问题,无法使用。

当我尝试创建新会话时,系统卡住了。 :(

我已将问题定位到一个名为“createSession”的函数,位于“/OpenTok/Util/Client.php”。

这是函数:

public function createSession($options)
{
    $request = new Request('POST', '/session/create');

try {
        $response = $this->client->send($request, [
            'debug' => $this->isDebug(),
            'form_params' => $this->postFieldsForOptions($options)
        ]);
    $sessionXml = $this->getResponseXml($response);
    } catch (\RuntimeException $e) {
        // TODO: test if we have a parse exception and handle it, otherwise throw again
        throw $e;
    } catch (\Exception $e) {
        $this->handleException($e);
        return;
    }
    return $sessionXml;
}

一旦尝试将数据发送到 $response,它就会卡住。

正在发送的数据是:

$this->isDebug() = bool(false);
$this->postFieldsForOptions($options) =  Array ( [archiveMode] => manual [p2p.preference] => enabled [api_key] => 46118732 )

一开始我还以为是synk时间不通,影响JWTas described in this post的问题,但是按照那里描述的,我也解决不了。

谁能指导我找到正确的解决方案?

提前致谢,

阿米特。

【问题讨论】:

  • TokBox 开发者布道者在这里。能否分享一下您使用的是哪个 SDK 版本?
  • 'OPENTOK_SDK_VERSION', '4.0.0')
  • 谢谢,阿米特。您能否在 repo 上创建一个问题,以便我们进一步调查? github.com/opentok/OpenTok-PHP-SDK

标签: php opentok tokbox


【解决方案1】:

TokBox 开发者布道者在这里。

如果您使用的是 Windows,请按照此处提到的说明查看 Guzzle 在哪里查找证书并根据需要进行更新。 cURL error 60: SSL certificate: unable to get local issuer certificate

如链接答案中所述,这是因为 Guzzle 已切换到使用 PHP 库 audodetect 来获取证书,而不是 process

【讨论】:

    猜你喜欢
    • 2018-03-15
    • 2016-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-11
    • 2020-12-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多