php-guzzleHow to troubleshoot cURL error 60 with Guzzle in PHP?
To troubleshoot cURL error 60 with Guzzle in PHP, you can use the following code snippet:
try {
$client = new GuzzleHttp\Client();
$res = $client->request('GET', 'https://example.com');
echo $res->getStatusCode();
} catch (GuzzleHttp\Exception\RequestException $e) {
echo $e->getMessage();
}
The output of the above code will be the error message associated with the cURL error 60.
Things to check when getting this error
- Check the URL you are trying to access is valid and reachable.
- Check the SSL certificate of the URL is valid and up-to-date.
- Check the cURL version you are using is up-to-date.
- Check the Guzzle version you are using is up-to-date.
Helpful links
More of Php Guzzle
- How to set a user agent in PHP Guzzle?
- How to set a timeout for a request with PHP Guzzle?
- How to add an SSL certificate to a request with PHP Guzzle?
- How to handle a RequestException with PHP Guzzle?
- How to make an asynchronous send with PHP Guzzle?
- How to convert a response to an array with PHP Guzzle?
- What version of PHP is required for Guzzle?
- How to make HTTP request with PHP Guzzle?
- How to stream with PHP Guzzle?
See more codes...