Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Error cloning live site on local server

    Hi all,

    I have been away from development for many months and now need to upgrade my live site to 1.3.8a.
    I need to replicate the live site on my local server, do all the upgrade and tweaking, and then reload, but am finding unexpected trouble doing so.
    First, I need to import the database, so I exported the DB with PHPMyAdmin (provided by my webhost), and created a sql.gz file.
    The latest version of PHPMyAdmin has detection for this kind of files.
    Also, I made sure that the Add Drop Tables command was checked.
    Then I created on my local server a database with exactly the same name, but when attempting to import from the file I get a fatal error: more than 300 seconds execution time.
    Obviously, this is a previous step to customizing the configure.php files in order to connect to that database (I can get those from a fresh ZC install I made on same machine).
    So I am at a loss, cannot figure out what is going wrong.
    Also, I forgot what the function of the dist-configure.php files is, in what do they differ from the configure.php files?
    Thank you very much in advance.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Error cloning live site on local server

    add drop table if exists is not the only option you need see
    https://www.zen-cart.com/tutorials/i...hp?article=103

    As to the 300 sec limit - this is something that I did not know was on a local - but fixing it might cause troubles when you attempt to upload the DB to your live server as you can not adjust it there.

    Suggest that you having a backup - go to admin and prune the entries that it allows
    admin > tools > store manager - - I think that the admin activity log can be truncated from there if not you can do this in phpmyadmin.

    Pull another backup with the correct settings and compare the compressed sizes - Hopefully it is small enough not to exceed the 300 sec limit. If not -

    Use phpmyadmin and the settings and split the DB into 2 or more parts by selecting only a sub-set of the tables and rename the resulting file with a leading 1, 2, 3 etc

    Import each of these one at a time to your local and make a note of where you make the breaks to use later when you have this completed and need to move it to your server.
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Re: Error cloning live site on local server

    Hey Kobra,

    Thank you so much for the fast reply on a Sunday.
    You are really a worker!
    I had read the article you mention previously and, yes, all those entries are checked by default, except the Add Drop Tables, that is the reason for my bewilderment, I usually try to find answers before posting.
    I have no idea why PHPMyAdmin refuses to import a database with the same name, I am also using the latest version of XAMPP on XP SP2, so go figure.
    Will try your suggestions and be back to you if trouble.
    Thanks again.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Error cloning live site on local server

    I have no idea why PHPMyAdmin refuses to import a database with the same name
    Depending upon who and how phpmyadmin is configured the DB name should not be added just the data - as from phpmyadmin a DB can not be created
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Re: Error cloning live site on local server

    Hey Kobra,

    I have been struggling with this issue, trying different settings.
    I could manage to import once from the backup to a database with the same name, so this was not the problem, but this had to be done in two attempts because the script timed out and only allowed partial import.
    Most of the time I was getting the fatal error I described, if you are interested in knowing about it, let me know and I will post the sql log here with the offending line highlighted.
    I couldn't make much sense of it.
    I finally decided to move the whole test environment to a different, faster, computer.
    I created there a test database and could import from the sql.gz file, successfully in the first attempt, but even there it took a long time.
    Consider that my database is still very small, I am wondering what will happen when it gets larger...
    I'll test without using compression in the backups, maybe that will speed up things.
    Thanks.

  6. #6
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Re: Error cloning live site on local server

    Hi,

    I tested both ways and there was no noticeable difference.
    Guess I'll keep the compressed format, because of the max. size of the file that PHPMyAdmin allows imports from.
    Thanks for all the fast help.

 

 

Similar Threads

  1. Database transfer - Local test site to live server
    By Rob from Blossom in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 21 Jul 2011, 05:38 AM
  2. Update local copy and then transfer to live server
    By fawad123 in forum General Questions
    Replies: 9
    Last Post: 24 Apr 2010, 12:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg