PHP client stopped working due to SSL certificate error
This was a specific incident that occurred on September 30, 2021, and it has already been resolved by Sanity's team. Based on the community thread, here's what happened and how it was fixed:
What happened: This was a server-side SSL certificate issue on Sanity's infrastructure, not a problem with the PHP client itself or your local setup. The error appeared suddenly across all environments (production and local) because it originated from Sanity's servers.
How it was resolved: The Sanity team identified the issue as being related to their SSL certificate chain and deployed a workaround on their end. According to the thread timeline:
- Issue reported: September 30, 2021 at 3:05 PM
- Sanity confirmed they were investigating: 3:26 PM
- ETA for fix announced: 4:30 PM (30 minutes out)
- Fix deployed: 7:50 PM
- Confirmed working: October 1, 2021 at 6:58 AM
If you're experiencing this issue now: Since this was resolved in 2021, if you're seeing similar SSL certificate errors today, it's likely a different cause. Here are some troubleshooting steps:
Update your CA certificates - Your system's certificate bundle may be outdated:
- On Mac:
brew update && brew upgrade openssl - On Ubuntu/Debian:
sudo apt-get update && sudo apt-get install --only-upgrade ca-certificates - Update your
php.inito point to the latestcacert.pemfrom curl.se/ca/cacert.pem
- On Mac:
Check Sanity's status - Visit Sanity's status page to see if there are any current incidents
Verify your PHP/OpenSSL versions - Outdated versions may have certificate validation issues. Run
php -i | grep "OpenSSL"to check
Note: The temporary workaround of setting 'verify' => false in the Guzzle client (mentioned in the thread) should never be used in production as it disables SSL verification entirely and makes your application vulnerable to security attacks. Only use it for temporary local debugging if absolutely necessary.
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.