Answer the question
In order to leave comments, you need to log in
How to fix curl error "60: SSL certificate problem: self signed certificate in certificate chain"?
Good afternoon.
There is a script that crashes with a certificate error. (php-7.2-x64 + apache-php-7.2-x64)
$url = "https://oauth.vk.com/access_token?client_id=APP_ID&client_secret=APP_SECRET&code=7a6fa4dff77a228eeda56603b8f53806c883f011c40b72630bb50df056f6479e52a&redirect_uri=REDIRECT_URI";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
$output = curl_exec($ch);
if ( ! $output) {
print curl_errno($ch) .': '. curl_error($ch);
}
curl_close($ch);
Answer the question
In order to leave comments, you need to log in
Simple to use:
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); //Auto redirect
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); //Disabling certificate verification
Why not satisfied with CURLOPT_SSL_VERIFYPEER ?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question