Question

cURL Could not retrieve the document

I have installed LAMP and setup a new website on Ubuntu 18. Website is working fine but when I try to check it on websites like copyscape it gives me error “cURL could not retrieve the document, error 35. - please ensure you entered the URL correctly” But when I move website to anyother cpanel hosting it works. Could anyone please guide and help me about the issue?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
February 14, 2024

Heya @zaryanshahzad,

Apart from what has already been mentioned, can you post the exact command you are running?

Additionally, if you are on Ubuntu 18, I’ll urge you to upgrade it as soon as possible as Ubuntu 18 has not been supported from quite some time now and is a security risk for your applications, plus you can’t use anything new.

Bobby Iliev
Site Moderator
Site Moderator badge
February 13, 2024

Hello Zaryan,

I believe that the error 35 you mentioned typically relates to a problem with SSL connections, which can stem from various reasons.

Here are a few suggestions that you can try out:

  1. First, make sure that the SSL module is enabled in Apache. You can do this by running the following command:

    sudo a2enmod ssl
    

    After enabling, restart Apache to apply the changes:

    sudo systemctl restart apache2
    
  2. Make sure your SSL certificate is correctly installed and configured for your website. If you’re using a self-signed certificate for testing purposes, some external services like copyscape might not trust it, leading to errors. For a production environment, consider using a certificate from a recognized Certificate Authority (CA).

  3. The error could also be due to a mismatch in the SSL version or ciphers between your server and the external service. You can specify the SSL version in your cURL command using the CURLOPT_SSLVERSION option, or try updating cURL and OpenSSL to their latest versions to ensure compatibility.

If none of this helps, what you could do is to increase the verbosity of your cURL request to get more insights into what’s happening. This can be done by adding the -v flag in a command-line cURL request or setting CURLOPT_VERBOSE to true in your PHP script.

Feel free to share the output here so I could advise you furhter!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel