Glad you got it working!  Just a note, I don't monitor the ES mailing list 
very closely...but if you have any more problems/questions with the PHP 
client in the future, feel free to just open a tick at the repo and I would 
be happy to help :)

-Z

On Wednesday, February 11, 2015 at 7:09:57 AM UTC-5, Paul Halliday wrote:
>
> That is the hint I needed.
>
> I had it w/o quotes at first and the page was failing. I just assumed this 
> was because of the lack of quotes, which once added allowed the page to 
> load. I should have looked at the error console, which was showing the 
> missing include :)
>
> All is good and working as expected.
>
> On Tuesday, February 10, 2015 at 11:17:20 PM UTC-4, Ian MacLennan wrote:
>>
>> I suspect that it is because you put your constant names in quotes, and 
>> as a result the keys are going to be wrong.  i.e. you 
>> have 'CURLOPT_SSL_VERIFYPEER' => true, while it should probably be 
>> CURLOPT_SSL_VERIFYPEER => true as shown in the link you provided.
>>
>> Ian
>>
>> On Tuesday, February 10, 2015 at 10:42:05 AM UTC-5, Paul Halliday wrote:
>>>
>>> Well, I got it working but had to make the declarations in CurlHandle.php
>>>
>>> I added:
>>>
>>> $curlOptions[CURLOPT_SSL_VERIFYPEER] = true;
>>> $curlOptions[CURLOPT_CAINFO] = '/full/path/to/cacert.pem';
>>>
>>> directly above:
>>>
>>> curl_setopt_array($handle, $curlOptions);
>>> return new static($handle, $curlOptions);
>>> ...
>>>
>>> What's strange is that I also tried placing them in the default 
>>> $curlOptions but those seemed to get dumped somewhere prior to 
>>> curl_setopt_array()
>>>
>>> Yucky, but working.
>>>
>>>
>>> On Monday, February 9, 2015 at 7:05:34 PM UTC-4, Paul Halliday wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am trying to get the configuration example from here to work:  
>>>>
>>>>
>>>> http://www.elasticsearch.org/guide/en/elasticsearch/client/php-api/current/_security.html#_guzzleconnection_self_signed_certificate
>>>>
>>>> My settings look like this:
>>>>  
>>>>  19 // Elasticsearch
>>>>  20 $clientparams = array();
>>>>  21 $clientparams['hosts'] = array(
>>>>  22     'https://host01:443'
>>>>  23 );
>>>>  24 
>>>>  25 $clientparams['guzzleOptions'] = array(
>>>>  26     '\Guzzle\Http\Client::SSL_CERT_AUTHORITY' => 'system',
>>>>  27     '\Guzzle\Http\Client::CURL_OPTIONS' => [
>>>>  28        'CURLOPT_SSL_VERIFYPEER' => true,
>>>>  29         'CURLOPT_SSL_VERIFYHOST' => 2,
>>>>  30         'CURLOPT_CAINFO' => '.inc/cacert.pem',
>>>>  31         'CURLOPT_SSLCERTTYPE' => 'PEM',
>>>>  32     ]
>>>>  33 );
>>>>
>>>> The error:
>>>>
>>>> PHP Fatal error:  Uncaught exception 
>>>> 'Elasticsearch\\Common\\Exceptions\\TransportException' with message 'SSL 
>>>> certificate problem: self signed certificate'
>>>>
>>>> What did I miss?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4821d7fc-5ce0-4b1a-a46f-fb20c61eb475%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to