CURL error 60: SSL certificate in Laravel 5.4

Asked
Active3 hr before
Viewed126 times

7 Answers

error
90%

Meta Stack Overflow , Stack Overflow Public questions & answers , Stack Overflow help chat ,Stack Overflow en español

Using cURL:

Set CURLOPT_SSL_VERIYPEER to false

Using Guzzle: Set verify to false, for example

$client - > request('GET', 'https://somewebsite.com', ['verify' => false]);
load more v
88%

It indicates that instead of a certificate problem, it could came from a environnement non-compatibility. I used XAMPP instead of WAMP and it worked.,Before anyone points me to these two laracasts answers: https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate,Do not ever modify files in the vendor/ folder. Ever. They can and will be overwritten on the next composer update you run.,https://laracasts.com/discuss/channels/general-discussion/curl-error-60-ssl-certificate-problem-unable-to-get-local-issuer-certificate/replies/52954

and set it to

    'redis' => [
       'driver' => 'redis',
       'connection' => 'cache-connection',
    ],

and now you can get your redis session records.

use IlluminateSupportFacadesRedis;
Log::debug(Redis::connection('session-connection') - > keys('*'));
load more v
72%

I have the following error when I am trying to reset a password using Laravel's built in authentication. When I enter my email and hit reset I get...,I have also ran var_dump(openssl_get_cert_locations()); which gave me the following...,I have googled this error and it from everything I have read I have tried the following, all of which have not worked...,After each I have restarted apache, however, nothing has worked.

I have also ran var_dump(openssl_get_cert_locations()); which gave me the following...

[
   "default_cert_file" => "/usr/lib/ssl/cert.pem",
   "default_cert_file_env" => "SSL_CERT_FILE",
   "default_cert_dir" => "/usr/lib/ssl/certs",
   "default_cert_dir_env" => s "SSL_CERT_DIR",
   "default_private_dir" => "/usr/lib/ssl/private",
   "default_default_cert_area" => "/usr/lib/ssl",
   "ini_cafile" => "/etc/ssl/certs/ca-certificates.crt",
   "ini_capath" => "/etc/ssl/certs",
]
load more v
65%

HI Any one else facing this issue with Laravel 5.4 while uploading file to S3. Kindly let me know., Loading ,Successfully merging a pull request may close this issue.,I'm getting this error with Drupal 8.4.0 as well. But not every time...

            $serviceAccount = ServiceAccount::fromJsonFile(__DIR__.
               '/firebaseKey.json');
            $firebase = (new Factory) -
               > withServiceAccount($serviceAccount) -
               > create();

            $database = $firebase - > getDatabase();
            $ref = $database - > getReference('Test');

            $key = $ref - > push() - > getKey();

            var_dump(openssl_get_cert_locations());
            return $key;
75%

How To Solve cURL error 60: SSL certificate in Laravel 5.4 Error ?,How cURL error 60: SSL certificate in Laravel 5.4 Error Occurs?, To Solve cURL error 60: SSL certificate in Laravel 5.4 Error You can use GuzzleHttp\Client:$client = new Client(['verify' => false]); , To Solve cURL error 60: SSL certificate in Laravel 5.4 Error You can use GuzzleHttp\Client:$client = new Client(['verify' => false]);

Set CURLOPT_SSL_VERIYPEER to false
load more v
40%

Do not ever modify files in the vendor/ folder. Ever. They can and will be overwritten on the next composer update you run.,Place this file in the C:\wamp64\bin\php\php7.1.9 folder,Make sure you remove the semicolon at the beginning of the line.,Save the file in this path starting from the base root of your laravel application vendor/guzzlehttp/guzzle/src/cacert.pem

Using cURL:

Set CURLOPT_SSL_VERIYPEER to false
load more v
22%

Right after upgrading my local PHP environment to 7.4 on the Windows laptop that I use at work, I ran a Laravel artisan console command for an HTTP request to a 3rd party API. I ran the command in my Git Bash terminal. The request is done using Guzzle and I received the following cURL error:,Since I wanted to be able to run the command in the Git Bash terminal, I had to fix the problem.,Next, locate your PHP installation. In Windows, mine is at C:\php-7.4. Open php.ini, find the block show below and add the absolute path of the certificate to it:,I'm almost certain that the PHP 7.4 upgrade wasn't the only cause. Previously, I had screwed up a local SSL certificate that I was using for https in the browser for my local projects.

Right after upgrading my local PHP environment to 7.4 on the Windows laptop that I use at work, I ran a Laravel artisan console command for an HTTP request to a 3rd party API. I ran the command in my Git Bash terminal. The request is done using Guzzle and I received the following cURL error:

GuzzleHttp\ Exception\ RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate(see https: //curl.haxx.se/libcurl/c/libcurl-errors.html)

   at C: \Users\ MyUserName\ code\ myproject\ vendor\ guzzlehttp\ guzzle\ src\ Handler\ CurlFactory.php: 201 197 |
   198 | // Create a connection exception if it was a specific error code.
   199 | $error = isset($connectionErrors[$easy - > errno]) 200 | ? new ConnectException($message, $easy - > request, null, $ctx) >
   201 | : new RequestException($message, $easy - > request, $easy - > response, null, $ctx); 202 |
   203 |
   return\ GuzzleHttp\ Promise\ rejection_for($error); 204 |
}
205 |

   Exception trace:

   1 GuzzleHttp\ Handler\ CurlFactory::createRejection(Object(GuzzleHttp\ Handler\ EasyHandle))
C: \Users\ MyUserName\ code\ myproject\ vendor\ guzzlehttp\ guzzle\ src\ Handler\ CurlFactory.php: 155

2 GuzzleHttp\ Handler\ CurlFactory::finishError(Object(GuzzleHttp\ Handler\ CurlHandler), Object(GuzzleHttp\ Handler\ EasyHandle), Object(GuzzleHttp\ Handler\ CurlFactory))
C: \Users\ MyUserName\ code\ myproject\ vendor\ guzzlehttp\ guzzle\ src\ Handler\ CurlFactory.php: 105

Please use the argument - v to see more details.
load more v

Other "error-undefined" queries related to "CURL error 60: SSL certificate in Laravel 5.4"