Home > database >  How to enable CurlHttpClient for WAMP in PHP 7.4 ?
How to enable CurlHttpClient for WAMP in PHP 7.4 ?

Time:01-13

I'm trying to open the index_dev.php file for a site on my Wampserver and I'm getting this error:

Internal Server Error - PHP Warning - Configure the "curl.cainfo", "openssl.cafile" or "openssl.capath" php.ini setting to enable the CurlHttpClient

I tried to do some research on how to enable curl on WAMP, but all of the info I was seeing was for PHP 5.x

As far as configuring, I don't have a clue what I should do to the "curl.cainfo", "openssl.cafile" or "openssl.capath" settings in my php.ini files.

Thanks in advance for your help!

CodePudding user response:

Go to https://curl.se/docs/caextract.html and download the latest .pem file.

Copy the .pem file to ..... well I put mine in C:\wamp64\bin\php called cacert.pem

This contains a whole bunch of certificates and because the file is created by Mozilla we sort of trust it.

Now using the WAMPManager, edit your current php.ini file by

left click wampmanager -> PHP -> php.ini

Find this parameter, it will be commented out with a ;

;openssl.cafile=

Change it to

openssl.cafile="c:/wamp64/bin/php/cacert.pem"

Save the edit, and then restart Apache to activate the change

  •  Tags:  
  • Related