실행시 설정

이 함수의 작동은 php.ini 설정에 영향을 받습니다.

cURL 설정 옵션
이름 기본값 가변성 변경점
curl.cainfo NULL PHP_INI_SYSTEM PHP 5.3.7 부터 지원.
PHP_INI_* 모드에 대한 상세와 정의는 Where a configuration setting may be set를 참고하십시오.

위 설정 지시어에 대한 간단한 설명입니다.

curl.cainfo string

기본 값은 CURLOPT_CAINFO 으로부터 가져옵니다. 이 설정은 절대경로를 요구합니다.

add a note add a note

User Contributed Notes 3 notes

up
0
ajith at pavanathara dot com
3 years ago
I was editing wrong php.ini file in last comment.

Even though loaded configuration path was showing as "D:\wamp64\bin\apache\apache2.4.37\bin\php.ini" inside phpinfo() of WAMP Server, It was actually loading "D:\wamp64\bin\apache\apache2.4.37\bin\phpForApache.ini"

Once I set both the variables inside phpForApache.ini, details are displayed in phpinfo() and error has gone without extra coding line.
up
0
ajith at pavanathara dot com
3 years ago
cURL error 60: SSL certificate problem: unable to get local issuer certificate

This local development error comes when curl.cainfo variable is not set correctly.

I faced this issue in PHP Version 7.3.1

In order to fix the error, I downloaded cacert.pem from https://curl.haxx.se/docs/caextract.html

Set the following paths in php.ini

curl.cainfo="D:\wamp64\bin\php\php7.3.1\extras\ssl\cacert.pem"
openssl.cafile="D:\wamp64\bin\php\php7.3.1\extras\ssl\cacert.pem"

Even after adding the paths and restart Apache, Inside phpinfo(), both the paths were showing blank.

The error will go only if we set via php code of the project.

Example code worked for me :-

$guzzle = new \GuzzleHttp\Client(['verify' => 'D:\wamp64\bin\php\php7.3.1\extras\ssl\cacert.pem']);
up
0
ASchmidt at Anamera dot net
4 years ago
As of PHP 7.2 (Win 64) this directive, will NOT show in the phpinfo() even though it's set.

(In comparison, an openssl.cafile directive will show, if it's set to the exact same path).
To Top