cURL error 77: error setting certificate verify locations: CAfile: C:\php\extras\ssl\cacert.pem.txt CApath: none (see https://curl.haxx.se/libcurl

Viewed 195

I was looking for answers, and i didn't find any one helpful so i came here to report my problem:

cURL error 77: error setting certificate verify locations: CAfile: C:\php\extras\ssl\cacert.pem.txt CApath: none (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.themoviedb.org/3/movie/338953?api_key=...

1st Note: I'm using php. 8.0.8, with laravel-9 and i changed php.ini a lot of times changing curl.cainfo and openssl.cafile with the same directory trying without .txt, moving the certificate .pem to crt... And also i have tried to install the certificate, but i have no ideia if it's correctly imported...

2nd Note: When i tried to show popular movies, just like the recent movies, i downloaded from the link and put on a json file, and i was with the same error, but in cases of showing a specific movie, i gave up from creating a new file.

I already tried two not security ways like using verify_peer as false on the request movies, and i changed settings.json including :

"http.systemCertificates": false,
"http.proxyStrictSSL": false,

MoviesController - show movie

    $ignore_certificate = [
        'ssl' => [
            'verify_peer' => false,
            'verify_peer_name' => false,
        ]
    ];

    Http::withOptions($ignore_certificate);

    $movie = Http::withToken(config('services.tmdb.token'))
        ->get('https://api.themoviedb.org/3/movie/' . $id . '?append_to_response=credits,videos,images')
        ->json();
0 Answers
Related