CakeFest 2024: The Official CakePHP Conference

Настройка во время выполнения

Поведение этих функций зависит от установок в php.ini.

Настройки конфигурации cURL
Имя По умолчанию Место изменения Список изменений
curl.cainfo NULL INI_SYSTEM  
Дополнительная информация и описания режимов INI_* даны в разделе «Места установки параметров конфигурации».

Краткое разъяснение конфигурационных директив.

curl.cainfo string

Значение по умолчанию для директивы CURLOPT_CAINFO. Данное значение должно быть указано в виде абсолютного пути.

add a note

User Contributed Notes 4 notes

up
5
knuklus at gmail dot com
2 years ago
cURL error 60: SSL certificate problem: unable to get local issuer certificate

This problem can occur when developing locally on windows. I am using windows 10 (x64)

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

Set the following value for in php.ini

curl.cainfo = "C: \ php-8.0.7 \ extras \ ssl \ cacert.pem"
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
-3
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
-12
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