Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Renaming admin folders

Renaming admin folders

Locked

Views: 3,069

Results 1 to 20 of 33
This thread is locked. New replies are disabled.
2 Mar 2010, 6:53 AM
#1
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Renaming admin folders

Hi i am in technological hell, I followed the instructions in the manual regarding renaming the admin folder for security reasons and voila no more site. I am fortunate in having an amazing hosting company who has a php guru and he changed the folder back to admin and reset the configuration files which were completely blank of all the information i had given. Now we have the front end happening but the back end admin is giving up "You are seeing this page". My hosting company thinks that there may be some missing files in the admin/includes folder but he is not sure. Why would the manual suggest such a thing .. as it seems now I will to start again. Maybe i am missing something? Site is https://www.broomebeads.com.au Thanks for any help

2 Mar 2010, 7:26 AM
#2
muzz avatar

muzz

Totally Zenned

Join Date:
Mar 2009
Location:
Australia
Posts:
604
Plugin Contributions:
0

Re: Renaming admin folders

If things aren't working.. it means unfortunately that you have not followed the instructions exactly or you have missed something.
It cold even be the FTP client you are using is not stable.
(try filezilla it's free!)

I suggest you first back up your website. Go right through the read me files again and give things another shot.

2 Mar 2010, 9:55 AM
#3
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Renaming admin folders

You might also post the contents of your admin/includes/configure.php file here after disguising your login and password info so we can take a look.

2 Mar 2010, 1:29 PM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Renaming admin folders

wotnow:

Thanks for your response. Image of Admin.Inc.lConfig attached.
http://i605.photobucket.com/albums/tt133/WhatNowThe2nd/Forums/AdminIncConfig.jpg. Am looking for information that directed me to change admin folder name and will post when i find it.

This .jpg shows you have several errors in the file.

//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/

define('DIR_FS_ADMIN', '/office/');
define('DIR_FS_CATALOG', '/');

These defines are NOT "COMPLETE" paths. (see example).

Also, if you are ever going to be using SSL then you'll need to redefine your HTTPS hostname ("localhost" won't work over the internet).

Cheers
Rod

2 Mar 2010, 8:50 PM
#6
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

Thank you ... not really sure whether to put in local path to files ie the path to the files on my computer or the path to the files on the server?

It is a little confusing because the heading says local/physical
which would make me think the path required is on my computer but then in the example it says public_html which makes me think it should be www.broomebeads ... or webspace/httpdocs/admin?

3 Mar 2010, 12:21 AM
#7
muzz avatar

muzz

Totally Zenned

Join Date:
Mar 2009
Location:
Australia
Posts:
604
Plugin Contributions:
0

Re: Renaming admin folders

Here is an example: (IF you have an SSL if not edit any https to http)

As mentioned previously you will need to check the file paths relate to your webhosting directory structure.

Don;t fret. You will get there.

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'http://www.broomebeads.com.au');
define('HTTPS_SERVER', 'https://www.broomebeads.com.au');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/broomebeads/public_html/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'YOURdatabaseUSERNAME');
define('DB_SERVER_PASSWORD', 'YOURdatbasePASSWORD');
define('DB_DATABASE', 'YOURdatbaseNAME');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');

3 Mar 2010, 1:10 AM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Renaming admin folders

wotnow:

Thank you ... not really sure whether to put in local path to files ie the path to the files on my computer or the path to the files on the server?

All configuration entries are referring to the server.

wotnow:

It is a little confusing because the heading says local/physical
which would make me think the path required is on my computer but then in the example it says public_html which makes me think it should be www.broomebeads ... or webspace/httpdocs/admin?

I can appreciate where you are coming from, but as mentioned, all settings will refer to the server.

If you look carefully there are actually two different types of 'paths' to be found in the defines section of the config files, namely

define('DIR_WS_something
define('DIR_FS_something

The "DIR_WS" entries relate to the file locations as seen by the web-browser. (Web Server)
The "DIR_FS" entries relate to the file locations of the 'physical' files on the server. (File System).

Does this help clarify things?

Cheers
Rod

3 Mar 2010, 3:32 AM
#9
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

Thanks for your help .. i am almost at the point where it seems like i should just start again but i will give this one last go. Just to clarify in this section have i got it right?

// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/webspace/httpdocs/admin/');
define('DIR_WS_CATALOG', '/webspace/httpdocs/admin/');
define('DIR_WS_HTTPS_ADMIN', '');
define('DIR_WS_HTTPS_CATALOG', '/');

I dont have SSL yet and also I was wondering if I tested this site locally as opposed to live on server .. would i then have to come back and change all the paths or is this done dynamically.

3 Mar 2010, 3:53 AM
#10
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

I have altered both config files now and it is making no difference to being able to log in to the back end. Here is an image of my includes config as opposed to the other one which was my admin.. includes.

http://i605.photobucket.com/albums/tt133/WhatNowThe2nd/Forums/IncludesConfig.jpg Thanks

3 Mar 2010, 4:16 AM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Renaming admin folders

Read the comments carefully.
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');

Since you appear to indicate that your site is installed in the webroot (directly in /httpdocs/), and you don't have SSL (so HTTP and HTTPS would be the same):

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

3 Mar 2010, 6:53 AM
#13
muzz avatar

muzz

Totally Zenned

Join Date:
Mar 2009
Location:
Australia
Posts:
604
Plugin Contributions:
0

Re: Renaming admin folders

Have you edited BOTH config files?

Double check your changes are saving.

4 Mar 2010, 10:48 AM
#14
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

Yes and have checked FTP upload, thanks:frusty:

4 Mar 2010, 2:18 PM
#15
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

Would someone please tell me whether this section is correct, thanks.
My server is configured like this .. webspace/httpdocs/admin. in other words zen cart directory installed in the root directory This is the configure.ph from admin/includes/cong

// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

                              OR

define('DIR_WS_ADMIN', '/webspace/httpdocs/admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '//webspace/httpdocs/admin/');

TRAILING SLASH OR NO TRAILING SLASH?

4 Mar 2010, 3:53 PM
#16
gjh42 avatar

gjh42

Black Belt

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

Re: Renaming admin folders

Both wrong. Try:

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

4 Mar 2010, 9:17 PM
#17
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

I feel like Im going around in circles here. I had previously tried how you said to do it in your reply and it still didnt work but I have changed it back now. This is a screenshot of includes/conf

This is a screenshot of admin/includes/conf

.

I don't think the problem lies with these 2 configuration files. I am still getting the "You are seeing this page". What I cant figure out is why the back ups i did whilst the store was working, show no information in the configuration files, ie they dont have all the dbase settings etc. Why would they not copy this information .. it doesn't make sense. I should be able to go back in my time machine and the config files should reflect all the information that was originally stored in the config files.

I also have a program called diffmerge which does file or folder comparisons to see if there is some other problems tho technically there shouldn't be as all I originally did was to change the name of the admin folder :cry: I expected there to be some discrepancies as I am using a zencart template called orange which I was modifying. I have attached a screen-shot of a comparison between the downloaded full file set (stored in my download folder) and the BroomeBeads folder (which is a reflection of whats on my server).

I am at my wits end with this and dont know whether I should just start again ..tho someone said this to me ... I can't see what good a re-install will do you. If you keep going back to square one every time then I don't think you'll ever get there. You need to work logically through each issue/challenge until you get it right.

Thanks for any help .. i am dreaming config files:cry:

5 Mar 2010, 1:00 AM
#18
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Renaming admin folders

wotnow:

I don't think the problem lies with these 2 configuration files.

Regardless of any other possible problems, your config files are still wrong.

Furthermore, yes, you are going around in circles.

If you please review my first reply to you regarding your problem I told you that your defines for the DIR_FS entries were incorrect.

For some reason you then went on to edit, and then re-edit the DIR_WS entries instead (those were perfectly ok as the were).

Your latest screenshots show that your DIR_FS are still incorrect and haven't been changed from your first screenshots.

Cheers
Rod

5 Mar 2010, 1:25 AM
#19
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

Hi Rod in plain english, sorry for misunderstanding so many times, can you please type out exactly what i should type in these areas .. considering that my server is set up /webspace/httpdocs and which config file are you referring to .. or both. Also do you know why the backups i did are not showing the settings i put in there when it was working. Thanks for your time, I appreciate it.

PS I did refer to your 1st email and still dont get it, sorry

5 Mar 2010, 12:35 PM
#20
wotnow avatar

wotnow

Zen Follower

Join Date:
Jan 2010
Location:
Broome
Posts:
331
Plugin Contributions:
0

Re: Renaming admin folders

Third guess ..

and

Do I have it right please