# cURL required but it's installed

**URL:** <https://discuss.elastic.co/t/curl-required-but-its-installed/109032>\
**Category:** Elasticsearch\
**Created:** [November 24, 2017, 1:04pm UTC](https://discuss.elastic.co/t/curl-required-but-its-installed/109032 "2017-11-24T13:04:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sylvain\_Attoumani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_attoumani/32/45401_2.png) [@Sylvain\_Attoumani](https://discuss.elastic.co/u/Sylvain_Attoumani)\
**Post date:** [November 24, 2017, 1:04pm UTC](https://discuss.elastic.co/t/curl-required-but-its-installed/109032/1 "2017-11-24T13:04:12Z")

</div>

I'm working with elasticsearch on a php project. I have a file (elastic.php) where there is :

```auto
<?php

require 'vendor/autoload.php';
$hosts = [
    'host'=>'localhost'
];
$client = Elasticsearch\ClientBuilder::create()->setHosts($hosts)->build();
$params = [
    'index' => 'test',
    'type' => 'test',
    'id' => 1,
    'client' => ['ignore' => 404]
];
echo $client->get($params);

```

But when I do `php elastic.php` I have the following issue :

```auto
Stack trace:
#0 /path/to/elasticsearch/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ClientBuilder.php(452): Elasticsearch\ClientBuilder::defaultHandler()
#1 path/to/elasticsearch/elastic.php(7): Elasticsearch\ClientBuilder->build()
#2 {main}

```

And when I do :  
`curl --version`

I have :  
`curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3`

I am on Ubutnu, with php 5.6.32 and using elasticsearch 5.

Thansk for the help guys

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 22, 2017, 1:04pm UTC](https://discuss.elastic.co/t/curl-required-but-its-installed/109032/2 "2017-12-22T13:04:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
