简体   繁体   English

cURL已安装,但仍然出现此错误Elasticsearch-PHP需要cURL或自定义HTTP处理程序

[英]cURL is already installed but still giving this error Elasticsearch-PHP requires cURL, or a custom HTTP handler

I am trying to implement Elastic-search in my Laravel project but it is giving this error. 我试图在我的Laravel项目中实现Elastic-search,但它给出了此错误。

Elasticsearch-PHP requires cURL, or a custom HTTP handler. Elasticsearch-PHP需要cURL或自定义HTTP处理程序。

I double checked it for cURL and it is loaded inside my php also I was previously working on some other project and send many requests to different API's through cURL and it is working over there but inside laravel it gives me this error. 我仔细检查了它的cURL,并将其加载到我的php中,我之前也正在其他项目上工作,并通过cURL向许多不同的API发送了许多请求,并且该请求在那儿起作用,但是在laravel内部却给了我这个错误。

Why my xampp is doing so and how can I fix this issue Thank you in advance. 为什么我的xampp会这样做,以及如何解决此问题,谢谢您。

I think you have multiple instances of PHP installed. 我认为您已经安装了多个PHP实例。 Check your Windows Enviroment Variables, to see from where PHP is running. 检查Windows环境变量,以查看PHP从何处运行。 Assuming your using Git, do a php -v in your terminal to see which php version is loaded and check if it corresponds with the php from your xampp. 假设您使用的是Git,请在终端中执行php -v以查看加载了哪个php版本,并检查其是否与xampp中的php版本相对应。 Or delete xampp and install it in a new folder like, webserver/xampp. 或删除xampp并将其安装在新文件夹中,例如webserver / xampp。 Enables the php modules, restart your apache and mysql and check your phpinfo(). 启用php模块,重新启动apache和mysql并检查phpinfo()。

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

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