Zen Cart Logo
Forums / Upgrading to 1.5.x / Upgrade problem without admin folder

Upgrade problem without admin folder

Views: 1,840

Results 1 to 13 of 13
25 Jan 2012, 8:26 AM
#1
servelan avatar

servelan

New Zenner

Join Date:
Apr 2011
Posts:
45
Plugin Contributions:
0

Upgrade problem without admin folder

Starting from a working 1.3.9h install, which worked fine, I modified all my .php files and uploaded them except for the admin and the zc_install folders.

I got an error message regarding having to upgrade the db (I'm afraid I'm not able to be precise about which error msg due to it being late and me being groggy), so I started by copying the zc_folder to the server, and then started the upgrade process from there.

It found that I had no 'admin' folder so I couldn't upgrade until I copied the admin to the server.

Given that I had, for security reasons as required with my original fresh install, renamed the admin folder, why did I have to put a new copy of the thing on the server? Was I supposed to temporarily rename the admin-folder-with-the-changed-name back to admin?

25 Jan 2012, 9:15 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrade problem without admin folder

Yes, that's what you need to do, along with merging your customizations into the new version of the admin folder.. There are many major admin files and entire folders changed for v1.5.0, so you need to upgrade the admin as well as the storefront to get to v1.5.0.

26 Jan 2012, 6:58 AM
#3
servelan avatar

servelan

New Zenner

Join Date:
Apr 2011
Posts:
45
Plugin Contributions:
0

Re: Upgrade problem without admin folder

Well, expletives. Bloody directions didn't tell me that. Back to the drawing board on the upgrade, I guess.

26 Jan 2012, 7:16 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrade problem without admin folder

Just curious... how did you read the directions to mean that you didn't need to do anything with the admin files? I thought they were pretty thorough.
Now that I think of it, maybe they didn't mention renaming /your_admin/ back to /admin/ for the file transfer - will have to check.

26 Jan 2012, 8:28 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrade problem without admin folder

gjh42:

Now that I think of it, maybe they didn't mention renaming /your_admin/ back to /admin/ for the file transfer - will have to check.
You won't find such mention, because it's not necessary.

27 Jan 2012, 1:31 AM
#6
servelan avatar

servelan

New Zenner

Join Date:
Apr 2011
Posts:
45
Plugin Contributions:
0

Re: Upgrade problem without admin folder

When I tried to upgrade with my securely-named admin folder as-is, the upgrade wouldn't proceed and said there wasn't an admin folder. Renaming the admin folder back to 'admin' got the process running (plus changing the config files to writeable).

I would assume that Zen Cart would know from reading the config .php file that my 'foobar' directory is indeed the admin directory, renamed...but for some reason, it didn't, and I really don't want to volunteer to do a repro 'cause I've got to get the store open for business.

27 Jan 2012, 3:33 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrade problem without admin folder

The catalog configure.php doesn't have any reference to what the admin foldername is, and the admin configure.php cannot be read by zc_install until it knows where the admin folder is - chicken/egg. (And in v1.5.0, the admin configure file dynamically looks up its own location and sets the define accordingly, so it is not even hard-coded into the file at all.)
So there is really no way around renaming it back to admin for the upgrade.

27 Jan 2012, 5:48 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrade problem without admin folder

Servelan:

When I tried to upgrade with my securely-named admin folder as-is, the upgrade wouldn't proceed and said there wasn't an admin folder. Renaming the admin folder back to 'admin' got the process running (plus changing the config files to writeable).

I would assume that Zen Cart would know from reading the config .php file that my 'foobar' directory is indeed the admin directory, renamed...but for some reason, it didn't, and I really don't want to volunteer to do a repro 'cause I've got to get the store open for business.

gjh42:

The catalog configure.php doesn't have any reference to what the admin foldername is, and the admin configure.php cannot be read by zc_install until it knows where the admin folder is - chicken/egg. (And in v1.5.0, the admin configure file dynamically looks up its own location and sets the define accordingly, so it is not even hard-coded into the file at all.)
So there is really no way around renaming it back to admin for the upgrade.

I repeat: The DATABASE UPGRADE option DOES NOT require the "admin" folder to be present, nor named "admin". It's immaterial to the process of upgrading the database.

27 Jan 2012, 6:04 AM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrade problem without admin folder

Sorry, I had just done an upgrade recently and apparently forgot which folder I renamed prematurely and had to un-rename:) At least I didn't delete zc_install before ensuring the upgrade was properly finished.

27 Jan 2012, 6:18 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrade problem without admin folder

Since 1.3.9a if it finds a database containing Zen Cart content (which is the same dependency that enables the DB Upgrade button), it may SHOW A WARNING about the /admin/includes/configure.php file not being present, but the DB Upgrade button activates, and you can indeed proceed with upgrading.
Of course, since you know there's no /admin/includes/configure.php file because your /admin/ folder is named something else, you can safely ignore the warning because you know it doesn't apply to you.
What you need is the DB Upgrade button, which, as I said, will appear properly if the /includes/configure.php file is present and points to a database that can be validated as containing Zen Cart tables/content, and will not impede progressing toward upgrading despite the /admin/includes/configure.php file warning.

This is in contrast to attempting an "Install", where if the /admin/includes/configure.php file is missing, it will of course prevent you from proceeding.

27 Jan 2012, 1:22 PM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrade problem without admin folder

I don't recall the exact content of that warning message, but I would suggest that it include a note that if you have renamed your admin folder, you may safely ignore this warning. That would probably eliminate a lot of needless concern or confusion for those who don't run upgrades frequently.

27 Jan 2012, 4:29 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Upgrade problem without admin folder

We might consider that for future updates. But it gets complicated because if the person is indeed wanting to do an "Install" to intentionally overwrite their existing database and start fresh, then the warning is indeed entirely appropriate. And, since that screen is the place where they choose whether to Install or Upgrade, we can't just assume we know what their intentions are.

27 Jan 2012, 5:21 PM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Upgrade problem without admin folder

Yes, tricky... It would have to say you can ignore the warning if you are upgrading, and the more words there are, the less likely they will be read correctly.