0

I'm trying to download the phpspreadsheet library for php 7.4 but I'm facing trouble with certificates. In my company, ZScaler is used to inspect network and it causes troubles with all those installers like pip or composer.

The first problem I encountered was the composer's installation. I guess I solved this problem by getting the appropriate certificate and setting its path in the openssl.cafile field (php.ini). Now, composer works but when I try to install my package, I have a lot of curl certificate errors.

Composer errors

Browsing the web, I found some information to put in the composer.json file but I'm not sure it was what I was looking for.

{
  "repositories": [
    {
      "type": "composer",
      "url": "https://repo.packagist.org/",
      "options": {
        "ssl": {
          "verify_peer": true,
          "allow_self_signed": true,
          "cafile": "C:/Program Files/Common Files/SSL/ZscalerRootCertificate-2048-SHA256.crt",
          "local_cert": "C:/Program Files/Common Files/SSL/ZscalerRootCertificate-2048-SHA256.crt"
        }
      }
    }
  ],
  "require": {
    "phpoffice/phpspreadsheet": "^1.20"
  }
}

Does anyone know how I could make the composer work ?

Ante
  • 1
  • 1

1 Answers1

0

Possible solution:

  1. First open Zscaler
  2. Change Status to: Turn off (Image take it from Google) enter image description here
  3. Install your things in composer
  4. Turn on again Zscaler again

NOTE: This works to install dependencies and similars, but not works if you need connect with an API (Now i'm trying to fix it)

Regards

Heterocigoto
  • 183
  • 2
  • 11