• Hi Alejandro

    We have installed the Woocommerce OsCommerce Sync plugin, which ran the first time which was great. Unfortunately trying to run it again is giving a “Could not connect to the osCommerce database “error

    This is despite using the same credentials as the first attempt which worked.

    The site is being built at https://skatkatzdesign.basicsitedesign.com.au and pulling from https://skatkatz.com.au

    Is this something you have seen before/can help with resolving?

    Thanks!

    Adam

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Alejandro Aranda

    (@alexwing)

    to make the connection from the wordpress server, this must be accessible to the oscommerce server database, has anything changed in the configuration of any of them?

    Try creating this script in a test.php file on the WordPress server, with the data of your connection to the oscommerce mysql, to rule out the problem of the servers.

    Running at http: // [yoursitewordpress] /test.php

    <?php
      $conn = new mysqli("localhost(or ip of mysql server, if a diferent host)", "user", "password", "databasename");
      
      if ($conn->connect_error) {
        die("ERROR: Unable to connect: " . $conn->connect_error);
      } 
    
      echo 'Connected to the database.<br>';
    
      $conn->close();
    ?>
    Thread Starter adamlee88

    (@adamlee88)

    Hi Alejandro

    I tried your script and everything connected OK.

    When we run osCommerce Sync with no products, customers, or orders selected, it works and says ‘osCommerce data imported successfully”.

    When we select anything to import (customers, orders, etc) it gives a 504 timeout error.

    Do you have any idea why this could be?

    Thanks for your help!

    Plugin Author Alejandro Aranda

    (@alexwing)

    This happens because the processing time of a script on your server has been exceeded, do not check all the options when importing.

    If you have too many products you can use limit and offset to split the import into pieces.

    You can also try to increase the limit of PHP execution.
    https://stackoverflow.com/questions/16171132/how-to-increase-maximum-execution-time-in-php

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Failure to Connect After First Attempt’ is closed to new replies.