Issue building a query using Laravel and Goutte

I’m building a website using Laravel 8 and Goutte 4. I’m trying to send a request to a website that requires authentication with a .pem file. In order to do so, I include the ‘local_cert’ param when creating the instance of http-client like this:

use GoutteClient;
use SymfonyComponentHttpClientHttpClient;

class Query
    protected $client;

    public function __construct()
        $this->client = (new Client(
                'timeout'    => 30,
                'local_cert' => //absolute path to the .pem file,

This works perfectly well on my local server, but when I try it on the production server, I get an Exception: "Problem with the local SSL certificate". The .pem file being used is the same in development and production, and the php can read the file in the production server.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *