简体   繁体   English

Dialogflow PHP REST API

[英]Dialogflow PHP rest api

PHP REST Api used for Dialog Flow detectIntent() function gives internal server error.用于对话流 detectIntent() 函数的 PHP REST Api 出现内部服务器错误。

We are connecting to Google Dialog flow service from AWS EC2 instance.我们正在从 AWS EC2 实例连接到 Google Dialog 流服务。 But we are receiving internal server error 500.但是我们收到内部服务器错误 500。

I have tried many solution, I initially thought it was AWS EC2 Instance problem because Dialog flow code is working fine to my local windows server but not on AWS server.我尝试了很多解决方案,我最初认为这是 AWS EC2 实例问题,因为 Dialog 流代码在我的本地 Windows 服务器上运行良好,但在 AWS 服务器上运行良好。

After few research, i found that it was the problem of bcMath module which is not installed on my EC2 Instance php setting.经过一些研究,我发现这是我的 EC2 实例 php 设置中未安装 bcMath 模块的问题。

Following are the steps to install bcMath module on PHP - 1. First check if you have bcMath.以下是在 PHP 上安装 bcMath 模块的步骤 - 1. 首先检查您是否有 bcMath。 Check this using phpinfo();使用 phpinfo() 进行检查; function.功能。 2. Use following command to install bcMath on your AWS instance php - $sudo yum install php55-bcmath 2. 使用以下命令在您的 AWS 实例 php 上安装 bcMath - $sudo yum install php55-bcmath

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM