Zen Cart Logo
Forums / Installing on a Linux/Unix Server / fresh installing v153, importing DB from v151: Your database appears to need patching

fresh installing v153, importing DB from v151: Your database appears to need patching

Views: 2,788

Results 1 to 17 of 17
24 Sep 2014, 12:16 PM
#1
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

fresh installing v153, importing DB from v151: Your database appears to need patching

I was hacked and my zencart folder was completely emptied. So I've done a a fresh install of v153.

My previous zencart version was v151.

Now I come to import the DB (fortunately that wasn't hacked.)

It successfully imports, but zencart shows this warning: Your database appears to need patching to a higher level. See Admin->Tools->Server Information to review patch levels.

The DB version is: Database Patch Level: 1.5.1

What should I do please?

24 Sep 2014, 1:05 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

tpeck:

I was hacked and my zencart folder was completely emptied. So I've done a a fresh install of v153.

My previous zencart version was v151.

Now I come to import the DB (fortunately that wasn't hacked.)

It successfully imports, but zencart shows this warning: Your database appears to need patching to a higher level. See Admin->Tools->Server Information to review patch levels.

The DB version is: Database Patch Level: 1.5.1

What should I do please?

In a way you have completed step 7 of the following: http://www.zen-cart.com/content.php?140-how-do-i-upgrade-my-site

But, it would be helpful to know what instructions you are using to perform this fresh install/database upgrade. I can likely tell you what would be expected as the next step; however, it ideally would be good for you to confirm that you have completed the previous steps.

Also, what has been done to prevent the hack again? Have you changed your ftp username (if able) and password? What has the host indicated as the method used to perform the file deletion that occurred?

24 Sep 2014, 1:43 PM
#3
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

Thanks for replying. Yes, the hack was extraordinary. About 20 directories all the files wiped out - obviously automatic because about 4 million page hits. I have changed my host. I can't take the risk of it being their side. Of course, it could be me fault; I'll never know.

I didn't quite do the steps you showed me. I did this:

a) made a new DB
b) installed fresh v153
c) added a custom template (from an old v139 backup)
d) imported the v151 DB into the new DB

..and got the warning. Not sure if I should have installed a 151 version instead of the latest.

24 Sep 2014, 2:03 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

tpeck:

Thanks for replying. Yes, the hack was extraordinary. About 20 directories all the files wiped out - obviously automatic because about 4 million page hits. I have changed my host. I can't take the risk of it being their side. Of course, it could be me fault; I'll never know.

I didn't quite do the steps you showed me. I did this:

a) made a new DB
b) installed fresh v153
c) added a custom template (from an old v139 backup)
d) imported the v151 DB into the new DB

..and got the warning. Not sure if I should have installed a 151 version instead of the latest.

Well, makes things easier for you (if real problems arise) if you do one or the other (move or upgrade). Right now you're kind of doing both...

As you see the next step is to update the database through the use of the zc_install... Your dmin directory needs to be renamed (if already changed) to admin in order for the upgrade of the database to occur. (I think) and it's because of my now uncertainty that it is suggested to do one or the other.

You will need to also do aa comparison of your template to the default version of the files to ensure that the template operates properly. (Statement made because I don't glean from the information provided that such an action has occurred.)

25 Sep 2014, 2:26 AM
#5
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

OK. I changed the admin name back to admin and attempted to upgrade the DB from zc_install. But the browser just went to a white page. So I guess something went wrong.

25 Sep 2014, 2:57 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

tpeck:

OK. I changed the admin name back to admin and attempted to upgrade the DB from zc_install. But the browser just went to a white page. So I guess something went wrong.

The install process generates a log in the logs folder. See if there is an error in the log files and perhaps where the action(s) failed.

30 Sep 2014, 7:37 AM
#7
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

I'm still getting nowhere - but thanks for all the pointers.

What I am now doing is fresh installing 1.5.3 and rebuilding from scratch. BUT I still want to start with importing the only database I still have - which is v1.5.1.

My question now is how do I best go about importing the DB? I can do it in phpadmin, but, of course, it isn't the correct version. OR I can use the zc_install, I suppose, except that the new host advised me to install zencart 1.5.3 on their server using Installtron or some such thing, which I did and I have a bare bones version now going.

Which is the best approach do you think?

30 Sep 2014, 9:34 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

tpeck:

I'm still getting nowhere - but thanks for all the pointers.

What I am now doing is fresh installing 1.5.3 and rebuilding from scratch. BUT I still want to start with importing the only database I still have - which is v1.5.1.

My question now is how do I best go about importing the DB? I can do it in phpadmin, but, of course, it isn't the correct version. OR I can use the zc_install, I suppose, except that the new host advised me to install zencart 1.5.3 on their server using Installtron or some such thing, which I did and I have a bare bones version now going.

Which is the best approach do you think?

They may have advised to use their auto-installer, but those of ZC highly discourage it. Usually, because once installed modifications to personalize the store tend to result in issues. The instructions provided above are one of a good set to install or upgrade.

To keep the previous database records you will in some sense end up with the same condition of having to upgrade the database using zc_install.

Personally, if the route to install zc 1.5.3 was an autoinstaller, I would make note of the settings in the configure.php files/copy them to a local computer, remove the auto-installed zc 1.5.3 files, download the latest zc version from http://www.zen-cart.com/getit (believe it is still 1.5.3 hotfix 1), apply any changes found at: http://www.zen-cart.com/showthread.php?213868-Known-Bugs-%28and-fixes%29-with-v1-5-3 applicable to the install package, do the install using the settings that were in the configure.php file reviewed above, this will put you at a ZC installed version of the software not a onestep click who knows what they changed installation.

Then basically move through instructions related to upgrading the database.

1 Oct 2014, 3:28 AM
#9
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

Thanks mc12345678, I took your advice and re-installed. Now I am at the point where I am attempting to upgrade the DB but getting an error:

[01-Oct-2014 03:16:53 UTC] PHP Warning: require_once(/home/aapressc/public_html/zencart/../includes/classes/vendors/password_compat-master/lib/password.php): failed to open stream: No such file or directory in /home/aapressc/public_html/zencart/includes/classes/class.zcPassword.php on line 52
[01-Oct-2014 03:16:53 UTC] PHP Fatal error: require_once(): Failed opening required '/home/aapressc/public_html/zencart/../includes/classes/vendors/password_compat-master/lib/password.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/aapressc/public_html/zencart/includes/classes/class.zcPassword.php on line 52

Line 52 is: > require_once (DIR_FS_CATALOG . DIR_WS_CLASSES . 'vendors/password_compat-master/lib/password.php');

...and password.php does exist at vendors/password_compat-master/lib/password.php, so I am stumped.

What should I try?

1 Oct 2014, 8:45 AM
#10
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

I FIXED IT!

What I had to do was DELETE the existing DB in Control Panel phpadmin (the 1.5.3 DB into which I had imported my 1.5.1 backup DB).

Then create a new DB in phpadmin and import the 1.5.1 backup DB into that.

Then make sure admin folder was named "admin" and zc_install was uploaded.

After that the DB upgrade worked!

1 Oct 2014, 9:35 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

Congratulations!!! By delete you mean completely remove all indications of the database to then create a completely new database? Dropping all of the tables didn't work? (This action removes all of the data inside of the database but keeps the outer shell of the database intact.)

1 Oct 2014, 10:56 AM
#12
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

Thanks! Yes, I completely removed the DB (in Control Panel: MySQL Databases - Delete). I didn't try dropping all the tables. It could be the outer shell was causing the problem; I'll never know. But the method I tried was successful.

1 Oct 2014, 11:06 AM
#13
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

tpeck:

Thanks! Yes, I completely removed the DB (in Control Panel: MySQL Databases - Delete). I didn't try dropping all the tables. It could be the outer shell was causing the problem; I'll never know. But the method I tried was successful.

Nope, certainly won't, and no need to specifically try. :)

I will give you that it could have been the outer shell or some process that was monitoring the whole thing considering it was an autoinstall. The expectation though if/when following the upgrade instructions would have been to at least drop the tables before uploading the old database.

Congrats though, happy zenning! :)

1 Oct 2014, 11:13 AM
#14
tpeck avatar

tpeck

Zen Follower

Join Date:
Oct 2008
Posts:
197
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

For the sake of accuracy, this was not the autoinstall - I followed your advice and started the installation again. And I'll remember to drop the tables in future! Thanks a lot for all your help.

1 Oct 2014, 11:35 AM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

Thanks for keeping me and others reading this straight. I made an assumption that the previously existing database was reused, not that a new database was created as part of the proper install performed using the ZC site available software.

Keep up the good work and support!

25 Oct 2014, 3:46 PM
#16
mario75 avatar

mario75

New Zenner

Join Date:
May 2012
Posts:
22
Plugin Contributions:
0

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

Hi.
I have come to this thread in my searches for something similar.
If I upload on the server the z.c.1.5.3. version and I try to make a fresh install on a z.c.1.3.9. database I will not have the "Upgrade" button during the installation and if I proceed I will end up with a new empty database.
But instead, deleting the new empty database, and creating a new one with the exact name (just like tpeck did) and importing again the 1.3.9. database and then running again zc_install I'll get the "Upgrade" button during the installation.
Short said: I get to upgrade the db from 1.3.9. to 1.5.3. after running the second time the zc_install on a 1.3.9. database.

My intention is to install a fresh new 1.5.3.z.c. and then import the old 1.3.9. db into it. I want to start over with the new version, but keep only the db. All this first on a test site. After all customisation I will install it on the live store.
I don't know whether I do something wrong or this is how it is supposed to work.
When I'll be ready to install it on the live site, will I have to install it twice like now, on the test site?

25 Oct 2014, 10:05 PM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: fresh installing v153, importing DB from v151: Your database appears to need patching

mario75:

Hi.
I have come to this thread in my searches for something similar.
If I upload on the server the z.c.1.5.3. version and I try to make a fresh install on a z.c.1.3.9. database I will not have the "Upgrade" button during the installation and if I proceed I will end up with a new empty database.
But instead, deleting the new empty database, and creating a new one with the exact name (just like tpeck did) and importing again the 1.3.9. database and then running again zc_install I'll get the "Upgrade" button during the installation.
Short said: I get to upgrade the db from 1.3.9. to 1.5.3. after running the second time the zc_install on a 1.3.9. database.

My intention is to install a fresh new 1.5.3.z.c. and then import the old 1.3.9. db into it. I want to start over with the new version, but keep only the db. All this first on a test site. After all customisation I will install it on the live store.
I don't know whether I do something wrong or this is how it is supposed to work.
When I'll be ready to install it on the live site, will I have to install it twice like now, on the test site?

For an upgrade of the database only when using brand new files, yes basically will run zc_install twice unless you're able to create your own configure.php file that fully addresses all of the necessary aspects. If you can do that or reuse an existing configure.php file that is properly setup for the store's conditions then zc_install is only needed to update the database information from the old store.

See: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading