Zen Cart Logo
Forums / Upgrading to 2.x.x / phpMyAdmin not overwriting new files with imported files

phpMyAdmin not overwriting new files with imported files

Views: 785

Results 1 to 11 of 11
05 Feb 2025, 13:36
#1
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

phpMyAdmin not overwriting new files with imported files

I just upgraded my site from ver. 1.5.7 patch1 to ver. 2.1.0. I also upgraded the php ver. to 8.3? on my server before I started the process. The database does not up load the old data base. Somehow the database is not being imported correctly. After banging my head against the desk for a day (not really), I checked the forum this morning.

I tried following the instructions by Torvista and SWGuy in the "zc_install issue" posting on this forum.

I created a new database XXX_210
I ran zc_install
I attempted to import my old database into it from a copy on my computer
It will not overwrite the files in the new database

Any ideas?

05 Feb 2025, 14:53
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,278
Plugin Contributions:
37

Re: phpMyAdmin not overwriting new files with imported files

Did you export with the Add DROP TABLE / VIEW / PROCEDURE / FUNCTION / EVENT / TRIGGER statement turned on?

~Melanie

05 Feb 2025, 16:00
#3
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: phpMyAdmin not overwriting new files with imported files

pazdar:

It will not overwrite the files in the new database

Am I getting this right - you already have a database with all the tables, and you're trying to import another one that would overwrite the existing one? I could be wrong, but I don't think you'll be able to do that.

You need to drop all tables on the new database, import the old one into it and THEN run the zc_install process to upgrade the database only. This way your new database will have the new tables and fields added where necessary and you get to keep all of the old data.

05 Feb 2025, 18:34
#4
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

Re: phpMyAdmin not overwriting new files with imported files

I just tried the following:

  1. dropped all the tables in my new database
  2. imported copy of old database off of my computer
  3. the tables in the new database were populated
  4. went to MySql®Databases - the new database file size was very low compared to the old database
  5. went back to phpMyAdmin - tables still populated
  6. removed the configure files that had installed previously in zc_install attempt
  7. checked phpMyAdmin again - tables still populated
  8. ran zc-install using the prefix: zen_ (which is what they currently are and also in the old database)
  9. when zc_install got to the Admin Setup page, I checked the tables in phpMyAdmin; they were now empty
  10. I went back up to step 1 above and continued again through step 8 except that I did not use any prefix.
  11. when zc_install got to the Admin Setup page, I checked the tables in phpMyAdmin; they were now empty and the "zen_" prefix had been removed

Any ideas?

05 Feb 2025, 18:59
#5
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

Re: phpMyAdmin not overwriting new files with imported files

Slight correction to above: the customer and category tables were emptied. The tables that were part of the upgrade such as admin_pages are still populated

06 Feb 2025, 09:39
#6
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: phpMyAdmin not overwriting new files with imported files

Step #4 is just confusing you, don't bother with that.
Step 6 is not something you should've done.

Step #8 is confusing ME.

Do your tables have the zen_ prefix? When you import the old database, does it start with zen_address_book, zen_admin etc? If so, check your includes/configure.php and make sure DB_PREFIX says zen_ (do the same for admin/includes/configure.php). Now run zc_install and it will automatically recognize your old database and offer an upgrade. Follow the process and you should be good to go.

So, let's summarize the correct flow:

  1. install 2.1.0
  2. go to phpMyAdmin and drop all tables, then import old database
  3. when the import is completed, check the prefix (if you see address_book, it means no prefix, if you see zen_address_book, it means prefix is zen_)
  4. check includes/configure.php and make sure DB_PREFIX matches your actual prefix
  5. do the same for YOURADMIN/includes/configure.php
  6. run zc_install and choose upgrade when asked
  7. enjoy a beer

Do NOT deviate from the above because you're gonna mess something up. Step #7 is crucial for success.

06 Feb 2025, 12:42
#7
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

Re: phpMyAdmin not overwriting new files with imported files

Good morning;

I followed balihr's steps except in step 4, I had to erase to old "configure.php" files and modify the "dist_configure.php" files.
In step 6 (as part of the zc_install, I set the "store prefix" to zen_

I did not get a step to upgrade the database

My data tables were erased again

06 Feb 2025, 14:57
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: phpMyAdmin not overwriting new files with imported files

You can't just modify the dist-configure.php files; you have to rename them to configure.php.
THEN you should see the upgrade button.

06 Feb 2025, 16:22
#9
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

Re: phpMyAdmin not overwriting new files with imported files

I tried that, still erased the tables and did not see the upgrade

07 Feb 2025, 13:03
#10
pazdar avatar

pazdar

Zen Follower

Join Date:
Jan 2008
Posts:
174
Plugin Contributions:
0

Re: phpMyAdmin not overwriting new files with imported files

Somehow I got the upgrade to work this morning. Now when I got to the admin site: https://www.mywebpage.com/admin (mywebpage and admin are obviously changed to something else), I get a blank screen

08 Feb 2025, 11:27
#11
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,769
Plugin Contributions:
20

Re: phpMyAdmin not overwriting new files with imported files

pazdar:

Good morning;

I followed balihr's steps except in step 4, I had to erase to old "configure.php" files and modify the "dist_configure.php" files.
In step 6 (as part of the zc_install, I set the "store prefix" to zen_

I did not get a step to upgrade the database

My data tables were erased again

This only means you didn't follow the steps, which lead to failure. If you have a map and it tells you to turn left, but you decide to turn right, you can't be surprised that you didn't get to the destination you wanted...

I don't know why you're refusing to follow the exact steps (which are basically the ONLY way to achieve what you want), especially since it's a simple and straight-forward process, and I hope someone else will be able to guide you through the rest.

As for the blank page, check your logs (instructions here) and you'll see what's happening.