Zen Cart Logo
Forums / General Questions / Cannot access Admin page after changing admin name for security

Cannot access Admin page after changing admin name for security

Locked

Views: 6,435

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
3 Oct 2007, 5:57 AM
#1
jatabad avatar

jatabad

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Cannot access Admin page after changing admin name for security

I followed all instructions and was able to download the zencart and save, however, when I got to the instructions that recommended changing the admin folder name and pulling up the admin/includes/configure.php files in my text editor, I think I goofed somewhere. I am not able to open my admin page at all and cannot access anything through my paths. I do have access to MYSQL, but it is very foreign to me. All I want to do is create my store/templates/set up paypal etc. Can anyone help me. Maybe I have named the files in my text editor incorrectly or did not put things in the correct order. I have checked and to the best of my knowledge everything looks fine. Please help if you can.
Thanks so much.

3 Oct 2007, 5:35 PM
#2
nomadrw avatar

nomadrw

Zen Follower

Join Date:
Sep 2007
Location:
Somewhere in Southern Cal
Posts:
331
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

make sure you have changed the path it will not be
www.yourstorename/admin
it will be www.yourstorename/new folder name
I bet that is the problem
if not

I would open your configure.php file and look for the changes you made.
make sure they match the folder name (admin) or whatever you named it.
Also make sure you have it like this.
define ('DIR_WS_ADIM', '/admin/'; make sure you have the'/ /';

you should have three changes!!!

file that you made the changes should be
admin/includes/configure.php

nomad

4 Oct 2007, 12:44 AM
#3
jatabad avatar

jatabad

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

Thank you for your response, I have double checked the pathway in admin/includes/configure.php. This is the hierarchy:

zencart/zen-cart/newfile/my admin name

I think the problem is actually in the second portion of the changes:
I am confused about putting my address in there.

define(DIR_FS_ADMIN', '/home/mystore.com/www/public/admin/');
define(DIR_FS_CATALOG', '?home/mystore.com/www/public/');
I am unsure what to change and what files to put here.
I do not have a file named "home" or "public", not sure what to do with the center portion either, should I leave the "www" and just enter"my url" for the .com?
I have never used this php before and sorry to sound like a dunce. I have been trying to fix this problem for over a week and really could use some additional advice.
Thanks again,
:smile:

4 Oct 2007, 1:03 AM
#4
jatabad avatar

jatabad

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

This is my setup in the configuration.

define('DIR_WS_ADMIN', '/admin file/');
define('DIR_WS_CATALOG', '/')
define('DIR_WS_HTTPS_ADMIN', '/admin file/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_FS_ADMIN', '/home/my URL/zencart/zen-cart/Sitenamefile/admin file');
define('DIR_FS_CATALOG', '/home/my URL/zencart/zen-cart/Sitrenamefile/');

I really think this second part is my problem.

4 Oct 2007, 2:42 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Cannot access Admin page after changing admin name for security

A summary of the FAQ:

Change this section:

define('DIR_WS_ADMIN', '/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/admin/');
define('DIR_WS_HTTPS_CATALOG', '/');

And this section:

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

You will end up with something that looks like this:

define('DIR_WS_ADMIN', '/mysecretadminarea/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/mysecretadminarea/');
define('DIR_WS_HTTPS_CATALOG', '/');

And:

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

4 Oct 2007, 2:51 AM
#6
nomadrw avatar

nomadrw

Zen Follower

Join Date:
Sep 2007
Location:
Somewhere in Southern Cal
Posts:
331
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

that the way I should have explained it to jatabad.
remember don't use spaces - if you need to use a space add a underscore. or use DrByte way.

nomad

4 Oct 2007, 4:57 AM
#7
jatabad avatar

jatabad

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

Thanks so much both of you, DrByte and Nomad, I made the changes exactly as was shown (this was great to see the actual areas I needed to change) I reloaded it to my webserver through ftp and I checked my admin url:
This is the message I received.
Warning: main(/home/mystore.com/www/public/includes/autoload_func.php): failed to open stream: No such file or directory in /home/content/t/a/c/joker1/html/zencart/zen-cart/sitename/mysecretadmin/includes/application_top.php on line 147

Warning: main(/home/mystore.com/www/public/includes/autoload_func.php): failed to open stream: No such file or directory in /home/content/t/a/c/joker1/html/zencart/zen-cart/sitename/mysecretadmin/includes/application_top.php on line 147

Fatal error: main(): Failed opening required '/home/mystore.com/www/public/includes/autoload_func.php' (include_path='.:/usr/local/lib/php') in /home/content/t/a/c/joker1/html/zencart/zen-cart/sitename/mysecretadmin/includes/application_top.php on line 147

Any further advice? I truly appreciate your help.
Thank you

4 Oct 2007, 5:17 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Cannot access Admin page after changing admin name for security

jatabad:

Warning: main(/home/mystore.com/www/public/includes/autoload_func.php): failed to open stream: No such file or directory in /home/content/t/a/c/joker1/html/zencart/zen-cart/sitename/mysecretadmin/includes/application_top.php
It seems you're changing things all over the place.

Your DIR_FS_CATALOG and other paths that contain this:
/home/mystore.com/www/public/

should read more like:

/home/content/t/a/c/joker1/html/

... plus your zencart/zen-cart/blahblah
(which... I don't understand why you're using multiple subdirectories)

all you needed to change was the 3 lines I showed earlier.

4 Oct 2007, 5:56 AM
#9
jatabad avatar

jatabad

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

Actually, the software downloaded like this, all I did was change the name of the sub directories because they were far too long. I am not sure why they installed this way. I have corrected the pathway as you suggested and that seemed to help, I am now getting a different error. (crossing my fingers and hoping it is nothing big) is as follows:

0 DB_ERROR_NOT_CONNECTED
in:
[select * from zen_project_version WHERE project_version_key = 'Zen-Cart Database' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Thanks again,

4 Oct 2007, 8:18 AM
#10
drbyte avatar

drbyte

Sensei

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

Re: Cannot access Admin page after changing admin name for security

jatabad:

Actually, the software downloaded like this, all I did was change the name of the sub directories because they were far too long. I am not sure why they installed this way.You're free to rename the long paths even before you upload them to your server.

jatabad:

I am now getting a different error. (crossing my fingers and hoping it is nothing big) is as follows:

0 DB_ERROR_NOT_CONNECTED
in:
[select * from zen_project_version WHERE project_version_key = 'Zen-Cart Database' ]That means that your database info is not correct in your configure.php files (or else your database server is not working).

DB_PREFIX
DB_SERVER
DB_SERVER_USERNAME
DB_SERVER_PASSWORD
DB_DATABASE

4 Oct 2007, 4:22 PM
#11
jatabad avatar

jatabad

New Zenner

Join Date:
Oct 2007
Posts:
6
Plugin Contributions:
0

Re: Cannot access Admin page after changing admin name for security

How can I change it to the correct information? In what area and what needs to be changed?

Thank you,
jatabad:smile:

4 Oct 2007, 5:53 PM
#12
drbyte avatar

drbyte

Sensei

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

Re: Cannot access Admin page after changing admin name for security

You just did a fresh install, right?
And now you've been trying to rename the admin by trying multiple things, but it's mussed up somehow.

Thus, I'd suggest this:

  1. Reinstall -- let the zc_install process rebuild your configure.php files for you.
    a) delete the zen cart files/folders from your server
    b) rename the folder containing your Zen Cart files so that it's more friendly and shorter than what you had originally
    c) re-upload the Zen Cart files to the server
    d) run the zc_install process via your browser

  2. Then do the quick rename by following the instructions in my earlier post to do the admin/includes/configure.php file edit, and then rename the /admin folder using your FTP program.