Page 1 of 4 123 ... LastLast
Results 1 to 10 of 38
  1. #1
    Join Date
    Dec 2008
    Location
    USA, North East
    Posts
    212
    Plugin Contributions
    0

    Default Database import problem

    Hello. Is there a way to "more easily" upload the old database into the new...for demo purposes only. I have read around the forum and understand that the only way to do this is to put a duplicate old copy of the database into the new area, then use the zc_install to upgrade that database. The way to do this would probably be to install the old version of Zen, then proceed from there. Just wondering if there is an easier way? I thought I might be a good idea to pretty much have a completely new site demo working well before we go taking down a busy site. Also, if I have two identical databases running, except with different names and on different folders...does this damage the original. Doesn't importing into a new, under the demo site, mess with the former site? Thank you.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: Problem upgrading from 1.5.4 to 1.5.5

    Quote Originally Posted by muah View Post
    Hello. Is there a way to "more easily" upload the old database into the new...for demo purposes only. I have read around the forum and understand that the only way to do this is to put a duplicate old copy of the database into the new area, then use the zc_install to upgrade that database. The way to do this would probably be to install the old version of Zen, then proceed from there. Just wondering if there is an easier way? I thought I might be a good idea to pretty much have a completely new site demo working well before we go taking down a busy site. Also, if I have two identical databases running, except with different names and on different folders...does this damage the original. Doesn't importing into a new, under the demo site, mess with the former site? Thank you.
    Let's start with your first sentence. Answering/addressing that should make all the rest of the paragraph either unnecessary or overly thought. (imagine me saying that...)

    If you have a new fileset. If you have a database (just happens to be a copy of an existing database). The new fileset is pointing to this independent yet copied database. Then if you use zc_install to upgrade that database. You have a "demo" version of your live site. From there you can figure out what it is you want changed (ideally lean on the files more than the database content) and can make the demo site look the way you want...

    Now... if there is some database related change that you would ultimately want to apply to your "future" new version, you can do that, but... understand also that you are working with your COPY of the database. This copy will become out-of-date as soon as a customer visits your live store... but that doesn't matter, because everything you do to your demo site to make it look like you want will need to be done to what will be a file copy of your demo site with your live database getting updated... WILL. Once you have worked out the kinks in the process to make that happen. Ie... DO NOT disable your live site or put it in maintence mode for the sole purpose of working on your demo site... If you are following the guidance of: http://www.zen-cart.com/entry.php?3-...d-of-upgrading
    Then you will have a functional demo site AND a continued live site until you are ready to "make the switch".

    So, is there an easier way to upload the old database into the new??? There is basically one way. To just do that... Yeah, there are several different tools to accomplish the task, phpmyadmin, mysql backup, mysql workbench, your host, etc... but regardless, to upgrade the database you need a database. To practice upgrading the database you need a database that is not supporting your money making business... make mistakes, try again but leave your business "set" alone until you have *successfully* practiced doing to a copy of that set what you will need to do to your live site. Take notes...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Dec 2008
    Location
    USA, North East
    Posts
    212
    Plugin Contributions
    0

    Default DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    Hello. First problem, it took about 8 tries to import an old database into the new version of zen. I'm keeping the old site live and created a test site. I imported the live info into the new test site to hammer out problems as you have suggested. using blue host, myphp admin

    It just would not import. I tried and tried and finally, after 8 tries, it finally successfully imported into the new testing database. An initial question would be, is there a better way to import a large database other than zipping it? it was zipped. Or is there another reason for the repeated failure to import? i'm going from a 1.51 version to 1.55 version. I asked blue host, they said, refer to your developer. Regardless, now it is imported but, wouldn't you know, it's not showing in the site!

    the prefix info in config is all accurate. I ran the zc_install again to see if a database upgrade was needed..nothing was needed. the only problem listed is "Gzip Extension in PHP is not enabled" i called up bluehost and they said it is enabled on their server. not sure if that's an issue or not.

    Any ideas how to get a live database into a test site? Any tricks or tips? as of right now, the new site still have the zc_install on there because i'm waiting to hear back from someone. The new testing site doesn't show the information from the successful import.

    Thanks

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    First of all your host is/was giving you the run around. Copying/moving the database really has nothing to do with Zen Cart. If there was a problem with say accessing a specific field or piece of data, maybe, but the database import or copy process is related to phpmyadmin as supported by your host.

    Now as for easier, generally within phpmyadmin and specifically if the second database will be on the same server, there is an option when looking at the overall database under the information tab to be able to copy the database/tables into a new or different database. That will prevent the need to export/import.

    That said. Now you supposedly have two databases that are both viewable in phpmyadmin. And based on a cursory review, you should at least see in the old database what is in your new/copy. (stated that way because your live store is still processing new orders, new customers, etc...)

    If that is the case, the the includes/configure.php and admin/includes/configure.php files should both have the database information (including DB_PREFIX) that point to your new temporary copy.

    Now, if you have been following the instruction in this FAQ: http://www.zen-cart.com/entry.php?3-...d-of-upgrading

    This new database would have already had data related to a fresh install. Your imported/copied database would replace that one *and* the two files I just mentioned would not need any changes because they would have already been pointing at this new database that now contains different data.

    So, what it seems like right now is that your new store's configure.php files need to contain the connection information specific to your new database.

    As to gzip, it can be enabled within the configuration menu once you get in, but it has no bearing on the install/upgrade. That's just a notification of the condition.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,690
    Plugin Contributions
    9

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    Quote Originally Posted by muah View Post
    Hello. First problem, it took about 8 tries to import an old database into the new version of zen. I'm keeping the old site live and created a test site. I imported the live info into the new test site to hammer out problems as you have suggested. using blue host, myphp admin

    It just would not import. I tried and tried and finally, after 8 tries, it finally successfully imported into the new testing database. An initial question would be, is there a better way to import a large database other than zipping it? it was zipped. Or is there another reason for the repeated failure to import?
    i think you are having some confusion. there is no real 'import' of a database into ZC. ZC assesses a database; writes records to tables within the database; updates records, etc.

    as part of an update process of ZC, ZC will again make changes to a database. without a database, ZC can not run. but there is no import per se...

    so if your problem was copying your live data to a test data set (database), this is a problem outside of ZC.

    people will say to use phpmyadmin to copy the database, and it sounds like that is where you are having your problem (i could be wrong).

    if you want an easier way to make a copy of your data to use for testing, and have access to the server command line, i would suggest using mysql command line functions. it may have a bigger learning curve, but using phpmyadmin to dump your data, and then re-import it into a new database, may be easier to learn, but its execution is fraught with problems due to limited size when uploading files.

    this is one of many articles on importing and exporting databases available out on the 'net. it talks about both using phpmyadmin and the command line:

    https://www.a2hosting.com/kb/develop...mysql-database

    if this is not the problem that you are experiencing, i apologize for the diversion.

    good luck!
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  6. #6
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    An initial question would be, is there a better way to import a large database other than zipping it?
    When setting up a new (local) server I usually have problems with phpmyadmin timing out on the first import to create the tables and content.
    To reduce the file size I (save and then) delete the admin activity log before the export, and manually unzip the file after downloading and prior to import so it only has to deal with the sql and not the decompression (on a remote server this should not be an issue).

    Subsequently I do all exports and imports using the Backupsql mod within the admin (as in my Github signature) and never have an issue, it only takes a few seconds and is far faster than phpmyadmin. I suppose because it uses a command line rather than the browser.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    Quote Originally Posted by muah View Post
    Hello. Is there a way to "more easily" upload the old database into the new...for demo purposes only. I have read around the forum and understand that the only way to do this is to put a duplicate old copy of the database into the new area, then use the zc_install to upgrade that database. The way to do this would probably be to install the old version of Zen, then proceed from there. Just wondering if there is an easier way? I thought I might be a good idea to pretty much have a completely new site demo working well before we go taking down a busy site. Also, if I have two identical databases running, except with different names and on different folders...does this damage the original. Doesn't importing into a new, under the demo site, mess with the former site? Thank you.
    A few steps that should help with what you want to do.

    1. Create a new dir./folder for the dev/test site.
    2. Password protect it using Apache .htaccess file
    3. Upload all files from current Live site. These should have been downloaded already to your computer for backup and safe keeping purposes.
    3. Create new database with a different name and database login than the Live site.
    4. Use phpMyAdmin to Import database into this new database. If the database is greater than 50MB contact your Hoster for help as you cannot use phpMyAdmin.
    5. Change the two configure.php files to match new database information.

    The above will not interfere with the Live site as there is no connection between the two and password protecting the dev/test dir. keeps out prying eyes and Search Engine Bots.

  8. #8
    Join Date
    Dec 2008
    Location
    USA, North East
    Posts
    212
    Plugin Contributions
    0

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    Quote Originally Posted by mc12345678 View Post
    So, what it seems like right now is that your new store's configure.php files need to contain the connection information specific to your new database.
    Yes, it's all pointing to the correct database, the config files...both of them. so what is the "connection information" you are talking about? thanks

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    Quote Originally Posted by muah View Post
    Quote Originally Posted by mc12345678 View Post
    So, what it seems like right now is that your new store's configure.php files need to contain the connection information specific to your new database.
    Yes, it's all pointing to the correct database, the config files...both of them. so what is the "connection information" you are talking about? thanks
    For Zen Cart to find the data, you must specify database credentials. You already know this part, but I'll re-state it for others who are seeing this for the first time:
    DB_DATABASE
    DB_USERNAME
    DB_PASSWORD
    These must all point to the actual database whose data you want Zen Cart to use. So if you've created a "test" database, then these credentials must be for that "test" database.

    And when you move data between stores, the most common "problem" people have is that their "old" or "live" store had a DB_PREFIX set to something other than blank (usually because they used some 3rd-party auto-installer that always stuck in a prefix), but when setting up your "test" store you left the DB_PREFIX blank when zc_install asked for it during setup.
    The fix is very simple: look at the /includes/configure.php of the "old"/"live" store, and find the DB_PREFIX definition. Then put that same value into both your admin and non-admin configure.php files on your "test" site.

    (The reason the "prefix" exists is to allow multiple stores to exist inside one database but be completely separate because all the database table names start with a separate prefix, ie: instead of "admin" they're "zen_admin" or "fred_admin" or "store2_admin" if the DB_PREFIX was set to "zen_" or "store2_", etc.)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: DATABASE IMPORT PROBLEM AND GZIP extention not enabled.

    And the way it looks in a ZC 1.5.5 install at least on the store/catalog side is:
    Code:
    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
    define('DB_SERVER', 'localhost');  // address of your db server
    define('DB_SERVER_USERNAME', '');
    define('DB_SERVER_PASSWORD', '');
    define('DB_DATABASE', '');
    At least when all of that data is blank.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Import database problem
    By linnx in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 24 Nov 2009, 04:31 AM
  2. Database Import
    By jballotti in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 4 Sep 2009, 08:08 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR