cURL error 60: SSL certificate prblm: unable to get local issuer certificate

cURL error 60: SSL certificate prblm: unable to get local issuer certificate

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Decoding cURL Error 60 in Offline Environments

When running PHP code against external APIs like YouTube's Data API, you often encounter a wall of text that looks more like a cryptic error message than a helpful debugging hint. Specifically, the exception GuzzleHttp\Exception\RequestException wrapping cURL error 60: SSL certificate problem: unable to get local issuer certificate is a classic symptom of an environment mismatch. This happens frequently when developers attempt to execute API calls in isolated or offline setups, such as a WAMPserver instance running on PHP 5.5.12 with Apache 2.4.9, without realizing that the underlying operating system lacks the necessary trust anchors.

The error message itself provides the clue: "unable to get local issuer certificate." By default, cURL and Guzzle rely on the operating system's bundled CA bundle to verify SSL certificates during the TLS handshake. In a standard Linux environment, this is often handled by ca-certificates. However, Windows-based environments like WAMP do not automatically populate the OpenSSL configuration with a comprehensive list of trusted Certificate Authorities (CAs). Even if you manually download the latest cacert.pem file and place it in your project directory, simply referencing that file is insufficient if the runtime environment cannot locate or trust the specific CA that signed YouTube's certificate.

YouTube, like most large service providers, frequently rotates their root certificates to maintain security. If your local machine does not have these updated root certificates installed in its trusted store, or if the path to the bundle you are referencing is incorrect, cURL will abort the connection before any data is exchanged. This is particularly problematic in offline environments where you might be relying on a cached version of the API client library that was built against an older set of CA certificates, while your local machine has not been updated with the latest ones.

To resolve this, you must ensure that the OpenSSL binary used by cURL can access a valid and up-to-date bundle of root certificates. The standard approach on Windows is to copy the cacert.pem file (available from https://curl.se/docs/caextract.html) into your application's directory, but you must also configure Guzzle or cURL explicitly to use it if the default system paths are insufficient.

If you are using a custom path for the certificate bundle, you might need to instantiate the Google_Client with specific SSL options or configure Guzzle's HTTP handler to bypass the default system store in favor of your local file. For instance, setting the environment variable SSL_CERT_FILE to point directly to your downloaded cacert.pem often forces OpenSSL to use that specific bundle instead of searching for it in the system registry.

Another critical consideration is the age of your PHP installation. PHP 5.5.12 is significantly outdated and may have bundled an older version of OpenSSL that lacks support for newer cipher suites or certificate validation logic introduced by modern browsers and servers. If you are forced to stick with this legacy version, updating the CA bundle alone might not be enough; you may need to manually update the OpenSSL DLLs or ensure that the cacert.pem file contains all the intermediate and root certificates currently in use by YouTube.

In scenarios where network access is restricted but offline updates are possible, administrators often maintain a local repository of trusted certificates. You can copy the latest CA bundle from an internal server to your WAMP environment and point cURL to it via configuration. This ensures that even without internet access, the application possesses the trust anchors required to validate the API provider's identity.

Finally, remember that relying on outdated PHP versions introduces significant security risks beyond just SSL issues. If your development workflow allows for upgrades, migrating from PHP 5.5.12 to a modern version is strongly recommended, as newer versions handle certificate validation more robustly and include updated CA bundles out of the box.

Our network