If this is your first visit, check our documentation. To post, register or login.
Forums / Zen Cart Code Suggestions / zc_install: Update to operate in Maintenance Mode

zc_install: Update to operate in Maintenance Mode

Started by lat9 on 6 Dec 2015, 3:15 PM · Views: 102

Results 1 to 9 of 9
6 Dec 2015, 3:15 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

zc_install: Update to operate in Maintenance Mode

The close-to-last-step in my normal process for performing upgrades is to place the existing site into maintenance mode, copy that "existing" database to the "upgrade" version and then use the upgraded zc_install to upgrade the database to the new version.

Unfortunately, zc_install won't run :( (in v1.5.4, anyway) when the site's in Maintenance Mode, so I've got to change that setting (creating an "opportunity" where someone could sneak in in the middle of the upgrade), upgrade the database and then put the site/database back into Maintenance Mode.

Allowing the zc_install to operate when the site/database is in Maintenance Mode would help to streamline the upgrade handling.

6 Dec 2015, 4:35 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: zc_install: Update to operate in Maintenance Mode

Maybe I am just a tad slow as I had a very late night with my cousin doing a Christmas movie marathon ... but I always set a site down for maintenance before I copy the database to a new database table to upgrade a site or set the Live site Down for Maintenance and upgrade directly on the Live Site database after I move the old files out and the new files in ...

I have never had an issue where the /zc_install would not run ...

Can you perhaps type a little slower on the steps you are using where you are running into this issue and perhaps I can the follow the bouncing ball here in trying to recreate the problem? :lookaroun

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Dec 2015, 4:58 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: zc_install: Update to operate in Maintenance Mode

Ajeh, when I ran into this issue, I'd created an /upgrade folder in the store's file-system, installed the upgraded files here for testing. The upgrade uses a separate copy of the live site's database.

Once the upgrade (both files and database) was "accepted" by the store-owner, I:

  1. Placed the "existing" site into Maintenance Mode.
  2. Copied the "existing" database to the "upgrade" database.
  3. Renamed the zc_install folder within the "upgrade" file-system (i.e. within the /upgrade folder)
  4. Ran http://www.mysite.com/upgrade/zc_install with the intention of upgrading the database
    That last step is where I received the "The site is in maintenance mode" message (the upgrade was to Zen Cart v1.5.4).
6 Dec 2015, 5:03 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: zc_install: Update to operate in Maintenance Mode

What version Zen Cart were you upgrading from?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Dec 2015, 5:50 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: zc_install: Update to operate in Maintenance Mode

Upgrading from v1.5.0 (not 1.5.1 as originally posted).

6 Dec 2015, 7:58 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: zc_install: Update to operate in Maintenance Mode

I created
1 new directory /v154up will a clean Zen Cart v154 files ...
2 copied a database from v150 to a new database blah_v154up
3 changed the Down for Maintenance ( DOWN_FOR_MAINTENANCE ) to true
4 Ran the /v154up/zc_install
5 Clicked the upgrade database
6 it had everything from v150 to the bottom checked
7 I entered my Admin login/password and said go

Bing bang boom ... did it ...

8 Said I was done ... clicked the Catalog and it came up

9 Clicked the admin ... it said the Alert and to get rid of /zc_install and rename my /admin ...
I did that and tried to go to my /mysecretadmin ... it let me login ...

Other than both sides reminding me I was Down for maintenance in messages at the top ... everything was done ...

Any chance you goobered on the configure.php files? :lookaroun

I cheat and do one things you do not ... I always do a test install of the new version that I am about to install with demo data in a test directory and test database. Then I use those configure.php files and copy them to where ever I will be doing the upgrade on the new real database then do the /zc_install so that I will not have conflicts with changes to the configure.php files from one version to another ...

Do your configure.php files match the configure.php files that would be generated if you did a clean install of v154?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

6 Dec 2015, 8:04 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,142
Plugin Contributions:
56

Re: zc_install: Update to operate in Maintenance Mode

Ajeh, I'll re-check and see if I can see what the heck is different. The configure.php files were auto-created on the upgrade's initial installation (using the ZC 1.5.4 zc_install process).

7 Dec 2015, 1:56 AM
#8
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: zc_install: Update to operate in Maintenance Mode

Had this issue once this year (1.3.9 --> 1.5.4).

I downloaded a fresh copy of the 1.5.4 install files and replaced my /zc_install folder (the one that failed me) with the folder from the fresh download. Bingo!

Don't know why but it did the trick.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

7 Dec 2015, 11:39 AM
#9
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: zc_install: Update to operate in Maintenance Mode

frank18:

Had this issue once this year (1.3.9 --> 1.5.4).

I downloaded a fresh copy of the 1.5.4 install files and replaced my /zc_install folder (the one that failed me) with the folder from the fresh download. Bingo!

Don't know why but it did the trick.

In previous runs of install to autogenerate configure.php files followed by upgrade of old database, I have compared the zc_install folder on server with fresh version and there are differences, don't recall off hand, but instructions for install/upgrade are to upload a fresh copy of the zc_install folder. Particularly since the instruction for install directs removal of the zc_install folder from the server (none to "rename") though it does also say to make a backup if necessary to keep on a local computer (won't help necessarily with the database upgrade because of the changes made if the "backup" comes after operation.)

As to performing the zc_install on the live site/database, the process (at some point through it and I would assume before beginning to modify the database) places the site in maintenance mode... Certainly it would be good to control this up front to minimize any "partial" transactions which is maybe a bit overkill of a concern, but that also may depend on the number of visitors/activity of the site.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...