Curl error: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error

Hello admin,
I used Curl in PHP, but it didn’t and work, it’s give an empty result for me so that I just printed the error message using this following code
if(curl_exec($curl) === false)
{
echo 'Curl error: ’ . curl_error($curl);
}
else
{
echo ‘working perfectly’;
}

output : Curl error: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error

I know this is problem happens because of HTTP.
I try to disable SSL checking using following code it also doesn’t work.

curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

But when I check if the Curl is enable or disable using following code, it says “enabled”
echo 'Curl: ', function_exists(‘curl_version’) ? ‘Enabled’ . “\xA” : ‘Disabled’ . “\xA”;

Is there is any solution for using Curl in http connection?

cURL is not available on InfinityFree hosing. see here: https://support.infinityfree.net/websites/javascript-error-using-api-or-mobile-android-app/#which-features-are-not-supported.

Also, can you provide your website domain? Are you using free hosting or premium (or non-free)?

EDIT:
Even though it returns cURL as “Enabled”, it is just mock and is actually not a thing.
If you want to use cURL, I suggest another free hosting, such as Heroku.

1 Like

@wackyblackie It is available on free hosting, you would have to be stupid to disable it.

The SSL issues all came from the OpenSSL update a couple of years ago. I’m supprised that the code you tried did not work - after a quick search I found this bit of code. It changes the SSL version/type to one that OpenSSL hopefully supports.

curl_setopt($curl, CURLOPT_SSLVERSION, 3); // Sets cURL to ue SSLv3 rather than TLSv1
4 Likes

Thank you! I didn’t know about that — must be why it never worked for me!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.