search

Home  >  Q&A  >  body text

Laravel 5.2 encountered the "No system CA bundle" problem when accessing a route

No system CA bundle could be found in any of the the common system locations.
PHP versions earlier than 5.6 are not properly configured to use the system's
CA bundle by default. In order to verify peer certificates, you will need to
supply the path on disk to a certificate bundle to the 'verify' request
option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not
need a specific certificate bundle, then Mozilla provides a commonly used CA
bundle which can be downloaded here (provided by the maintainer of cURL):
https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once
you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP
ini setting to point to the path to the file, allowing you to omit the 'verify'
request option. See http://curl.haxx.se/docs/sslcerts.html for more
information.

Asking for advice, I have never encountered this problem before. Is there something wrong with my SSL certificate?

世界只因有你世界只因有你2852 days ago611

reply all(1)I'll reply

  • PHPz

    PHPz2017-05-16 16:54:31

    There is no SSL certificate that can be recognized by the guzzle library...

    I searched for the documentation and found http://docs.guzzlephp.org/en/latest/request-options.html#verify-option

    When using the PHP stream wrapper on versions < 5.6, Guzzle tries to find your CA bundle in the following order:

    1. Check if openssl.cafile is set in your php.ini file.

    2. Check if curl.cainfo is set in your php.ini file.

    3. Check if /etc/pki/tls/certs/ca-bundle.crt exists (Red Hat, CentOS, Fedora; provided by the ca-certificates package)

    4. Check if /etc/ssl/certs/ca-certificates.crt exists (Ubuntu, Debian; provided by the ca-certificates package)

    5. Check if /usr/local/share/certs/ca-root-nss.crt exists (FreeBSD; provided by the ca_root_nss package)

    6. Check if /usr/local/etc/openssl/cert.pem (OS X; provided by homebrew)

    7. Check if C:windowssystem32curl-ca-bundle.crt exists (Windows)

    8. Check if C:windowscurl-ca-bundle.crt exists (Windows)

    You have set it up as above...

    reply
    0
  • Cancelreply