I am assuming this is what installing it is doing: I got the certificate and now I point to it. This is the config and calling the delete action which throws the "...no alive nodes..." exception:
require 'autoload.php'; //to call the cert installer autoloader
$hosts = ['https://localhost:9200'];
$caBundle = \Kdyby\CurlCaBundle\CertificateHelper::getCaInfoFile();
print "
"; print_r($caBundle); print "";
require '../vendor/autoload.php'; //call the PHP ElasticSearch API vendor autoload
$client = Elasticsearch\ClientBuilder::create()
->setHosts($hosts)
->setSSLVerification($caBundle)
->build();
print "client var is:
"; print_r($client); print "";
try {
$client -> indices() -> delete(array('index' => 'er'));
} catch (Exception $e) {
print "
"; print_r($e); print "";
return;
}
echo "DONE";