Php AWS部署中的Dialogflow崩溃

Php AWS部署中的Dialogflow崩溃,php,amazon-web-services,deployment,dialogflow-es,Php,Amazon Web Services,Deployment,Dialogflow Es,我在AWS EC2 Linux实例中部署了相同的源代码,但它无法显示dialogflow中的响应文本。 我在Dialogflow控制台中检查了对话历史记录,它正确地显示了请求和响应。然而,dialogflow客户端(PHP)在调用函数“Detectinent”后似乎崩溃了。 不幸的是,找不到任何日志 重新安装的Dialogflow客户端库 $formattedSession = $sessionsClient->sessionName($agent, $agentSession->

我在AWS EC2 Linux实例中部署了相同的源代码,但它无法显示dialogflow中的响应文本。 我在Dialogflow控制台中检查了对话历史记录,它正确地显示了请求和响应。然而,dialogflow客户端(PHP)在调用函数“Detectinent”后似乎崩溃了。 不幸的是,找不到任何日志

重新安装的Dialogflow客户端库

  $formattedSession = $sessionsClient->sessionName($agent, $agentSession->session_id);
  // Set Text Input
  $textInput  = new TextInput();
  $textInput->setText($text);
  $textInput->setLanguageCode($lang);

  // Set Parameters
  $optionalArgs = array();

  $queryInput = new QueryInput();
  $queryInput->setText($textInput);

  $response = $sessionsClient->detectIntent($formattedSession, $queryInput, $optionalArgs);

  $action = $response->getQueryResult()->getAction(); //The action name from the matched intent.

希望以下经验能帮助他人: 就我而言,php版本与Google API库之一不兼容。因此,它在我们无法捕捉的地方崩溃了。 解决方案:卸载PHP,并安装兼容版本的PHP