Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP verify failed with LetsEncrypt

Having an issue when trying to read a stream :

$result = file_get_contents($url, false, stream_context_create(
    ['http' => ['timeout' => (float) $this->options['timeout']]]
));

SSL operation failed with code 1. OpenSSL Error messages:

error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed

Before anyone answers i am not going to do

 "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),

Am hoping someone else has used letsencrypt and has some proper way of making sure its validated.

feel free to check my cert on my domain lukepolo.com

like image 307
LukePOLO Avatar asked Sep 25 '22 19:09

LukePOLO


1 Answers

openssl.cafile= curl.cainfo=

in your php.ini , you need both

like image 105
LukePOLO Avatar answered Sep 28 '22 11:09

LukePOLO