13

i'm deploy laravel 5.2 to ubuntu and installed elasticquent lib and elasticsearch 2.3.4 , when i try to figure the result of aggregation :

RuntimeException in ClientBuilder.php line 144:
Elasticsearch-PHP requires cURL, or a custom HTTP handler.

I already install curl using command sudo apt-get install php5-curl and its still display the same error

How to fix it?

Thank you

1
  • maybe too late but check allow_url_fopen in your php.ini. I got similar error GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler.. allow_url_fopen = On fixes issue Commented Feb 14, 2017 at 15:59

2 Answers 2

26
sudo apt-get install php-curl

Try this, it will install curl as per your version of php.

Sign up to request clarification or add additional context in comments.

2 Comments

I had to sudo service apache2 restart after installing php curl to get it to work
but remember mention the specific PHP version with the command
5

You must run sudo apt-get install curl php5-curl to install curl and its php extension, if you are using PHP7, you must install php7.0-curl instead of php5-curl

1 Comment

nice, but Jaydeeps solution is better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.