• Resolved scottl31

    (@scottl31)


    Hi,

    Trying to test the import by csv but get errors. I first tried a file with four products and it only imported the first one and gave an error on the other three. So I added three products to the file, and then it imported the 2nd, 4th and 6th, and gave errors on the 1st, 3rd, 5th and 7th.

    The error is the same for all and looks like this:

    “Error getting remote image https://website.com/wp-content/uploads/2023/01/Ewing_J_Spacious-1012×1024.jpg. Error: cURL error 60: SSL certificate problem: unable to get local issuer certificate”

    WordPress 6.2, Woocommerce 7.5.1 with PHP 7.4

    Can anyone shed any light?

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi there,

    Based on the error message you have shared, it seems like the issue is related to the SSL certificate of the website from where you are trying to import the images. The error message suggests that the SSL certificate of the website is not valid or not recognized by your server, which is causing the import to fail. Most likely, the error is caused due to a certificate chain issue.

    To resolve this issue, I recommend the following steps:

    1. Check if the SSL certificate of the website from where you are trying to import the images is valid and recognized by your server. You can use online SSL checker tools to verify the SSL certificate. Please issue a scan of your site as well.

    2. If the SSL certificate is valid, then try adding the following code to your wp-config.php file:

    define('CURLOPT_SSL_VERIFYPEER', false);

    This code will disable the SSL verification for cURL, which should allow the import to proceed.

    3. Updating PHP to the latest version might also resolve the issue. This is often caused by missing or outdated local SSL certificates, which are shipped with packages like PHP, or other server software.

    If the above steps do not work, you can try contacting your hosting provider to check if any server-side issues are causing the SSL certificate verification to fail.

    I hope that these steps will help you resolve the issue. Thanks!

    Thread Starter scottl31

    (@scottl31)

    Thanks for the response. I’ll try these things that you mentioned.

    All the images are on the same server/site I’m importing on. That’s why this error is confusing. I would expect that they should all work, or all give an error. Why would some work and some not?

    I’ll let you know if adding the code to the config file works.

    Thanks,
    Scott

    Thread Starter scottl31

    (@scottl31)

    That code did not work. The errors were the same.

    So I changed PHP to 8.1 and cannot use the admin panel as this error fills the page:

    Fatal error: Uncaught Error: Call to undefined function create_function() in /www/wwwroot/site1.whiterocktool.com/wp-config.php:82 Stack trace: #0 /www/wwwroot/site1.whiterocktool.com/wp-load.php(50): require_once() #1 /www/wwwroot/site1.whiterocktool.com/wp-admin/admin.php(34): require_once(‘…’) #2 /www/wwwroot/site1.whiterocktool.com/wp-admin/edit.php(10): require_once(‘…’) #3 {main} thrown in /www/wwwroot/site1.whiterocktool.com/wp-config.php on line 82

    This is line 82:
    add_filter(‘filesystem_method’, create_function(‘$a’, ‘return “direct”;’ ));

    I still find it strange that some images work and some don’t. They are all the same site and the same as the import.

    Any other suggestions you can think of? We are self hosted.

    Thanks!
    Scott

    Thread Starter scottl31

    (@scottl31)

    If you could help with the error above due to PHP 8.1 (and 8.2), that would be great.

    But I searched more and found this code that worked with the curl error:

    • Don’t verify SSL certificates
      */
      add_action( ‘http_api_curl’, function( $handle ) {
      curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, false );
      curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, false );
      });

    Hi @scottl31

    Thanks for reaching out!

    I undertsand that you are receiving the error message above when trying to import products on your site using a CSV file.

    As a first step, can you please share how are you importing products to your site? Is it thru the built-in Product CSV Importer and Exporter? If so, can you please share with us the CSV file so that we could check this further?

    Otherwise, if this was added thru a third-party plugin or a custom code, it would be best to reach out to the developers for further assistance here.

    Meanwhile, as per the error log, this happens when the SSL certificate on the server is not verified or properly configured. I did some research and found this article could be a good starting point: How to Fix cURL error 60: SSL certificate problem: unable to get local issuer certificate (The Definitive Solution)

    Hope this helps!

    Thread Starter scottl31

    (@scottl31)

    I have been used to using a plugin called WP All Import, but I wanted to try the built in csv importer. So I created a single product and hit export so I could get a csv with all the fields I’d need, so I used that.

    I don’t see a way to upload the file. How can I show you the file?

    Hi @scottl31

    You could use any cloud-sharing service like Dropbox, WeTransfer, Google Drive to share the CSV file here.

    Thanks!

    Thread Starter scottl31

    (@scottl31)

    Hi,

    Here is the link:
    https://we.tl/t-nT7OvyCT1h

    Thanks!

    Hi @scottl31

    Thanks for sharing the CSV file you are using here.

    Tried to import the CSV file to my site and I was able to verify the issue here as all products were not imported and received the same error message below:

    Have you tried to check the solutions provided on this article about How to Fix cURL error 60: SSL certificate problem: unable to get local issuer certificate (The Definitive Solution) and see if this resolves your issue here?

    Thread Starter scottl31

    (@scottl31)

    I’m actually testing on different environments on virtual boxes. It worked without any issue on one, but the environment had other things wrong that I didn’t like.

    On my apache environment, after the disable the curl check further up worked, I re-enabled it and tried the article you linked, and that worked. But seriously, what a hassle.

    However, on my aprillium abyss server, the cacert option did not work, but the disable curl check did.

    So now I have two ways to deal with this.

    Thank you!

    HI @scottl31

    I’m glad to hear that you’ve found two ways to deal with the issue you were experiencing on different environments. I understand that it can be a hassle sometimes, but I’m here to help you through it.

    It’s great to know that disabling the cURL check and following the article we provided worked for your Apache environment. However, I’m sorry to hear that the cacert option didn’t work for your Aprillium Abyss server.

    Let us know how the testing goes!

    Hi @scottl31 ,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if you need any further help with this.

    Cheers!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Product Import by CSV errors.. cURL error 60’ is closed to new replies.