Open SSL Extension issue

713 Views Asked by At

I've to run composer install command but i found following errors: (I already uncomment openssl extension from xampp)

Problem 1 - docusign/click-client is locked to version v1.0.0 and an update of this package was not requested. - docusign/click-client v1.0.0 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
Problem 2 - docusign/esign-client is locked to version v6.0.0-rc and an update of this package was not requested. - docusign/esign-client v6.0.0-rc requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.
Problem 3 - docusign/rooms-client is locked to version v1.1.0-rc and an update of this package was not requested. - docusign/rooms-client v1.1.0-rc requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension. Problem 4 - mashape/unirest-php is locked to version v3.0.4 and an update of this package was not requested. - mashape/unirest-php v3.0.4 requires ext-curl * -> it is missing from your system. Install or enable PHP's curl extension.

And when i run command

composer update

[RuntimeException]

You must enable the openssl extension in your php.ini to load information from https://repo.packagist.org
1

There are 1 best solutions below

6
On

you'll need to enable curl on your PHP.ini configuration and also to install the curl-ca-bundle.crt

per namecheap:

CA bundle is a file that contains root and intermediate certificates. The end-entity certificate along with a CA bundle constitutes the certificate chain.
The chain is required to improve compatibility of the certificates with web browsers and other kind of clients so that browsers recognize your certificate and no security warnings appear.

This is what you'll need to do:

  1. download the curl cacert.pem file. It sounds like you're using windows. Rename this downloaded file to curl-ca-bundle.crt.
  2. Move/Copy this renamed file into the C:\xampp\apache\bin\ folder.
  3. With XAMPP open, on the Apache menu list, click config, then choose edit PHP.INI enter image description here
  4. Use ctrl+f and search for curl.
  5. You should see ;extension=curl under the Dynamic Extensions section. Remove that semicolon on the front to enable the curl extension.
  6. Search for the next entry and you should see a [ Curl ] section that specifies where this ca-bundle.crt file is located. Fill in the location specified above so that your entry looks like this: curl.cainfo="C:\xampp\apache\bin\curl-ca-bundle.crt". Save the file and close it.
  7. Restart Apache (and PHP) in Xampp by clicking Stop, then Start again.

Update:

based on your comments and this separate SO question, I tried php -i and looked for my php.ini file used (by php-cli). I see that it too is indeed a different ini file, mine was located in C:\tools\php80 and it had curl uncommented in the extensions section, but I DIDNT need to specify the ca-bundle.crt path as I specified above. remove the semicolon to enable curl on the php-cli program (which composer uses to load the dependencies).

Edit 2 (Originally as a comment below):

I have openssl enabled on my php ini as well, I needed to specify openssl.cafile="C:\xampp\apache\bin\curl-ca-bundle.crt" when searching for [openssl]. Also it appears that I have extension=php_openssl.dll listed under the Module Settings section. You should be able to edit the PHP.ini with those corrections. Restart Apache from Xampp and try it again.