Forums / Upgrading from 1.3.x to 1.3.9 / Can't access my admin after renaming

Can't access my admin after renaming

Locked

Views: 11,472

Results 1 to 20 of 40
This thread is locked. New replies are disabled.
28 Jun 2009, 11:31 AM
#1
corinne avatar

corinne

New Zenner

Join Date:
Jun 2005
Posts:
37
Plugin Contributions:
0

Can't access my admin after renaming

Hi there,

I was running on 1.3.7 and just added the security patch (followed the instructions included), & renamed my admin folder.
Unfortunately I'm not able to access my admin anymore.

Any idea of what's causing this?
Many thanks in advamce!

Warning: include(includes/auto_loaders/config.core.php) [function.include]: failed to open stream: No such file or directory in /home/xxx/public_html/store/boutique/zc-admin/includes/application_top.php on line 127
Warning: include(includes/auto_loaders/config.core.php) [function.include]: failed to open stream: No such file or directory in /home/xxx/public_html/store/boutique/zc-admin/includes/application_top.php on line 127
Warning: include() [function.include]: Failed opening 'includes/auto_loaders/config.core.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxx/public_html/store/boutique/zc-admin/includes/application_top.php on line 127
Fatal error: Call to undefined function zen_get_languages() in /home/xxx/public_html/store/boutique/zc-admin/index.php on line 25

28 Jun 2009, 12:56 PM
#2
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Can't access my admin after renaming

did you modify configure.php included in your admin / includes folder to reflect your new admin name ?

since you have posted your new admin name here , it is recommended to change it again .

28 Jun 2009, 4:29 PM
#3
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Can't access my admin after renaming

the upgrade is not complete.

check if you have function zen_get_languages() in this file:

admin\includes\functions\general.php

28 Jun 2009, 5:04 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Can't access my admin after renaming

Pay careful attention to what Tony has said above...

You dutifully changed your admin folder name to zc-admin... but the reason you can't get to it is because your two configure.php files still refer to the ORIGINAL name.

Part of the instructions in applying the patch point zenners to the configure.php requirements.

... additionally, as Tony says, by posting that error message, you've also told the world that your admin folder's new name is zc-admin!

20 years a Zencart User

29 Jun 2009, 1:38 AM
#5
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Can't access my admin after renaming

as the error message indicates, zc-admin is already set in configure.php

why don't try both method. I bet
admin\includes\functions\general.php

is incomplete

29 Jun 2009, 3:30 AM
#6
music_man avatar

music_man

Zen Follower

Join Date:
Apr 2009
Posts:
188
Plugin Contributions:
0

Re: Can't access my admin after renaming

[QUOTE=schoolboy;747095]your two configure.php files still refer to the ORIGINAL name.

QUOTE]

The instructions I read refer to 1 configure.php file for change.....is there a second one to change? I can't seem to find one any place......

Thanks

MM

29 Jun 2009, 3:37 AM
#7
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Can't access my admin after renaming

only one need to change...no worry about that

29 Jun 2009, 4:30 AM
#8
music_man avatar

music_man

Zen Follower

Join Date:
Apr 2009
Posts:
188
Plugin Contributions:
0

Re: Can't access my admin after renaming

Thanks for the response.....

what about the "dist-configure.php" file? It also has the /admin/ reference in several lines.....

MM

29 Jun 2009, 4:48 AM
#9
ebusinessman avatar

ebusinessman

Zen Follower

Join Date:
Jul 2006
Posts:
132
Plugin Contributions:
0

Re: Can't access my admin after renaming

no need to do that...that's a backup of original configure.php

in fact, nothing need to do with that file.

29 Jun 2009, 5:03 AM
#10
music_man avatar

music_man

Zen Follower

Join Date:
Apr 2009
Posts:
188
Plugin Contributions:
0

Re: Can't access my admin after renaming

OK....thanks....just checking.....

MM

29 Jun 2009, 8:34 AM
#11
corinne avatar

corinne

New Zenner

Join Date:
Jun 2005
Posts:
37
Plugin Contributions:
0

Re: Can't access my admin after renaming

Hi everyone, many thanks for the quick help :)

ebusinessman:

the upgrade is not complete.
check if you have function zen_get_languages() in this file:
admin\includes\functions\general.php

Fact is, I don't have that file at all :(

And now I'm wondering: 1.3.8 isn't a patch, it's a new version, right?
and "patch 1.3.8" is something to apply after having upgraded?

Because I considered that 1.3.8 patch as the new version... but maybe I'm right. If not, that is most probably the problem?

29 Jun 2009, 10:28 PM
#12
egold avatar

egold

New Zenner

Join Date:
Jun 2009
Posts:
13
Plugin Contributions:
0

Re: Can't access my admin after renaming

After doing the admin change and the security path when logging into zencart I get the thank you for loading zencart screen. I've read this post and yes in the general.pho I do have

function zen_get_languages() {

global $db;

$languages = $db->Execute("select languages_id, name, code, image, directory

                           from " . TABLE_LANGUAGES . " order by sort_order");



while (!$languages->EOF) {

  $languages_array[] = array('id' => $languages->fields['languages_id'],

                             'name' => $languages->fields['name'],

                             'code' => $languages->fields['code'],

                             'image' => $languages->fields['image'],

                             'directory' => $languages->fields['directory']);

  $languages->MoveNext();

}



return $languages_array;

}

Is there something in this file that needed to be modified?
I also installed zen cart though fantastico and in MySql I have a listing for admin with the name admin, could that be a problem?

Thanks

Evan

30 Jun 2009, 2:42 PM
#13
egold avatar

egold

New Zenner

Join Date:
Jun 2009
Posts:
13
Plugin Contributions:
0

Re: Can't access my admin after renaming

Ok I fixed it, Im not sure if it's because I installed zencart thought fantastico or not but I deleted the

define('DIR_FS_ADMIN', '/home/mystore.com/www/public/admin/');
define('DIR_FS_CATALOG', '/home/mystore.com/www/public/');

from admin/includes/config.php and I was able to log into my admin

Again dont ask me why but could be something to be tried.

2 Jul 2009, 6:45 PM
#14
drbyte avatar

drbyte

Sensei

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

Re: Can't access my admin after renaming

That's odd. Sounds like you have a double set of definitions in that file ... which is not good. Better double-check to be sure that everything in that file, from beginning to end, is your own stuff, and not someone else's.

.
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.

12 Jul 2009, 12:38 PM
#15
corinne avatar

corinne

New Zenner

Join Date:
Jun 2005
Posts:
37
Plugin Contributions:
0

Re: Can't access my admin after renaming

Corinne:

And now I'm wondering: 1.3.8 isn't a patch, it's a new version, right?
and "patch 1.3.8" is something to apply after having upgraded?
Because I considered that 1.3.8 patch as the new version... but maybe I'm right. If not, that is most probably the problem?
Could anyone please point me to the right direction?
Thank you!

12 Jul 2009, 5:38 PM
#16
drbyte avatar

drbyte

Sensei

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

Re: Can't access my admin after renaming

Corinne,

You said you're using v1.3.7, so you need to apply the patch based on using v1.3.7.

Or, you could upgrade your entire site to v1.3.8, and then apply the patch for 1.3.8. Yes, 1.3.8 is a whole new version compared to 1.3.7.

Related Thread: Security Patches To Be Applied To Each Version

.
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.

14 Jul 2009, 4:24 PM
#17
janissaire avatar

janissaire

Zen Follower

Join Date:
Sep 2008
Location:
Toronto, Ontario, Canada
Posts:
474
Plugin Contributions:
0

Re: Can't access my admin after renaming

Hey - Think I got this right - I'm adding in my post here because the title matches my issue and thus other searchers may have less stuff to read through.

Same issue - I renamed the admin folder to TonySpumoni (ok it's not the real name) but you needed something for a refernce.

When I look at the config code it’s something like this – not real but give you the idea:

Pub-html/JacksStore/TonySpumoni – where jackstore is the store and Tony is the admin.

Now I have gone through both the admin/config and the includes/config to make sure that all are referencing the right path. They seem to be but it doesn’t work.

Old login: JacksStore/Admin
New Login: JacksStore/TonySpumoni

Any ideas?

Running on 1.3.8a with security patches installed.

After looking at computer code for a while - I think I'm going crazy but the voice in my head assures me that I'm not! http://www.jecphotography.com/mystore

14 Jul 2009, 5:23 PM
#18
drbyte avatar

drbyte

Sensei

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

Re: Can't access my admin after renaming

The detailed steps for the required edits when renaming your admin folder are discussed in the FAQ article on the topic: https://www.zen-cart.com/tutorials/index.php?article=33

.
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.

15 Jul 2009, 3:04 PM
#19
beyre avatar

beyre

Zen Follower

Join Date:
Feb 2009
Posts:
422
Plugin Contributions:
0

Re: Can't access my admin after renaming

Ok, now I have this problem.

I have a fully functioning store ... so the install went fine ... 100% functioning store.

I went and did the new security patch and renamed the admin folder - let's call it "abc123".

In admin/includes .... I changed the admin folder name in the configure.php file in the 3 places to abc123.

Now when I try to log into admin at, https://www.site.com/store/abc123 I get a 404 error.

I reversed the security patch and still nothing.

So, rename admin folder and change the admin folder name in 3 spots in the admin/includes configure.php file .... what else is there to do to rename the admin folder and have access ????

Yes, I changed the permissions on the configure.php file.
Renaming back to admin fixes things.

15 Jul 2009, 3:36 PM
#20
beyre avatar

beyre

Zen Follower

Join Date:
Feb 2009
Posts:
422
Plugin Contributions:
0

Re: Can't access my admin after renaming

Out of 5 zencarts I've installed in the last 5 months, only one was I able to successfully rename the admin folder. All of them are fully functioning stores with sales and everything.

It's almost as if there is a missing step that I somehow found out about in the one successfully renamed of store, but can't remember now.

  1. admin/includes/configure.php

change permissions
3 spots: change name of admin folder to new name (123abc)
save and upload
change permissions back

  1. rename the admin folder to new name (123abc)

  2. go to log into admin

What am I missing?