Настройка Π²ΠΎ врСмя выполнСния

ПовСдСниС Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΉ зависит ΠΎΡ‚ установок Π² Ρ„Π°ΠΉΠ»Π΅ php.ini.

Настройки ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈ cURL
Имя По ΡƒΠΌΠΎΠ»Ρ‡Π°Π½ΠΈΡŽ ΠœΠ΅ΡΡ‚ΠΎ измСнСния Бписок ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠΉ
curl.cainfo NULL INI_SYSTEM Β 
Π”ΠΎΠΏΠΎΠ»Π½ΠΈΡ‚Π΅Π»ΡŒΠ½ΡƒΡŽ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΡŽ ΠΈ опрСдСлСния Ρ€Π΅ΠΆΠΈΠΌΠΎΠ² INI_* Π΄Π°Ρ‘Ρ‚ Ρ€Π°Π·Π΄Π΅Π» Β«ΠœΠ΅ΡΡ‚Π° установки ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΎΠ² ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΈΒ».

ΠšΡ€Π°Ρ‚ΠΊΠΎΠ΅ Ρ€Π°Π·ΡŠΡΡΠ½Π΅Π½ΠΈΠ΅ ΠΊΠΎΠ½Ρ„ΠΈΠ³ΡƒΡ€Π°Ρ†ΠΈΠΎΠ½Π½Ρ‹Ρ… Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΈΠ².

curl.cainfo string

Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ ΠΏΠΎ ΡƒΠΌΠΎΠ»Ρ‡Π°Π½ΠΈΡŽ для Π΄ΠΈΡ€Π΅ΠΊΡ‚ΠΈΠ²Ρ‹ CURLOPT_CAINFO. Π”Π°Π½Π½ΠΎΠ΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ ΡƒΠΊΠ°Π·Π°Π½ΠΎ Π² Π²ΠΈΠ΄Π΅ Π°Π±ΡΠΎΠ»ΡŽΡ‚Π½ΠΎΠ³ΠΎ ΠΏΡƒΡ‚ΠΈ.

οΌ‹Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ

ΠŸΡ€ΠΈΠΌΠ΅Ρ‡Π°Π½ΠΈΡ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Π΅ΠΉ 3 notes

up
4
knuklus at gmail dot com ΒΆ
4 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
-1
ajith at pavanathara dot com ΒΆ
5 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
-2
ajith at pavanathara dot com ΒΆ
5 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.