Forums / General Questions / Unabe to log into Admin after renaming admin folder

Unabe to log into Admin after renaming admin folder

Locked

Started by hectorcalcano on 15 Dec 2006, 10:53 PM · Views: 9,275

Results 1 to 20 of 45
This thread is locked. New replies are disabled.
15 Dec 2006, 10:53 PM
#1
hectorcalcano avatar

hectorcalcano

New Zenner

Join Date:
Jul 2005
Posts:
3
Plugin Contributions:
0

Unabe to log into Admin after renaming admin folder

I am getting ready to go live with my store and I came across "Steps in Securing Your Zen Cart Store SSL Security Protection Tips.

After completing step 2 (rename your admin folder), I am no longer able to log into my store admin. I get 500 Internal Server Error.

my domain is https://www.jewelsoftheland.com

I attempted to rename things the way they were but that did not help.

Any help would be greatly appreciated.

15 Dec 2006, 11:29 PM
#2
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

I had the same problem but I had played with the wrong configure file.
These are the instructions that i eventually followed and it works.

RENAME ADMIN DIRECTORY.

A - Open your admin/includes/configure.php, using a simple text editor like notepad. Change all instances of admin to your chosen new admin folder-name. For maximum security, you may want to consider that new folder name should include numbers and a combination of upper and lower case letters. The longer you make this folder's name the more secure it will be. Make sure you leave all the intact.

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/');
B - Find your Zen Cart™ /admin/ directory, using your FTP software or your webhost File Manager. Rename the directory to match the settings you just made in step A.

So you change all the red to something else - example: JoBlogs245 (you pick a name)

After that you need to then access your admin not at:
mycart_name/admin

But instead:
mycart_name/**JoBlogs245

**I would change your files back and start again - Good Luck:smile:

So you change all the red to something else - example: JoBlogs245 (you pick a name)

After that you need to then access your admin not at:
mycart_name/admin

But instead:
mycart_name/**JoBlogs245

**I would change your files back and start again - Good Luck:smile:

'E-Start your web store' book - I Got it and now ..... I GET IT !....Well alot more of it anyway (-:

15 Dec 2006, 11:49 PM
#3
hectorcalcano avatar

hectorcalcano

New Zenner

Join Date:
Jul 2005
Posts:
3
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Thanks for the feed back.

When the original change did not work, I did try to rename back to /admin/ on the three sections and the folder but this did not work.

I changed these to test with:

define('DIR_WS_ADMIN', '/7710Admin/');
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_ADMIN', '/7710Admin/');
define('DIR_WS_HTTPS_CATALOG', '/');

And this section:
define('DIR_FS_ADMIN', '/home/jewelsof/public_html/7710Admin/');

however, this section does not match what your help file
shows:
/home/mystore.com/www/public/admin/

I may have copied an old backups configure file. I keep getting 500 Internal Server Error when I try to log in at https://www.jewelsoftheland.com/7710Admin/

Additional comments welcome.

16 Dec 2006, 12:06 AM
#4
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Lokks like you have changed the congigure file but you need to rename your admin directory folder to the same for it to work.

If this is your file structure:
/home/mystore.com/www/public/admin/

then you change the admin to 7710Admin

example: /home/mystore.com/www/public/7710Admin/

but I wouldnt name it using the word admin/Admin etc

'E-Start your web store' book - I Got it and now ..... I GET IT !....Well alot more of it anyway (-:

16 Dec 2006, 12:49 AM
#5
hectorcalcano avatar

hectorcalcano

New Zenner

Join Date:
Jul 2005
Posts:
3
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Again, thanks for your reply. I changed everything back to 'admin' and I cannot get access to the login page.

The link I'm trying to access is http://www.jewelsoftheland.com/admin/
the page that comes up is:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Apache/1.3.37 Server at https://www.jewelsoftheland.com Port 80

===============================

My admin/includes/configure.php contents are:

<?php // /** * * @package Configuration Settings * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // Main webserver: eg, <http://localhost> - should not be empty for productive servers // HTTP_SERVER is your Main webserver: eg, <http://www.yourdomain.com> // HTTPS_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> // HTTP_CATALOG_SERVER is your Main webserver: eg, <http://www.yourdomain.com> // HTTPS_CATALOG_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> /* * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings */ define('HTTP_SERVER', 'http://jewelsoftheland.com'); define('HTTPS_SERVER', 'https://jewelsoftheland.com'); define('HTTP_CATALOG_SERVER', 'http://jewelsoftheland.com'); define('HTTPS_CATALOG_SERVER', 'https://jewelsoftheland.com'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'false'); define('ENABLE_SSL_ADMIN', 'false'); // 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_ADMIN', '/admin/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_ADMIN', '/admin/'); define('DIR_WS_HTTPS_CATALOG', '/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); 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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * 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_ADMIN', '/home/jewelsof/public_html/admin/'); define('DIR_FS_CATALOG', '/home/jewelsof/public_html/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', 'zen_'); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', '*******'); define('DB_SERVER_PASSWORD', '*******'); define('DB_DATABASE', 'jewelsof_zc1'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage // The next 2 "defines" are for SQL cache support. // For SQL_CACHE_METHOD, you can select from: none, database, or file // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder // ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash define('SQL_CACHE_METHOD', 'database'); define('DIR_FS_SQL_CACHE', '/home/jewelsof/public_html/cache'); ?>

Continued assistance is appreciated.

18 Dec 2006, 10:35 PM
#6
blind1 avatar

blind1

Zen Follower

Join Date:
Dec 2006
Location:
Victoria, Australia
Posts:
351
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Hi hectorcalcano,

i had the same problem earlier after restoring my database and I had to upload fresh configure.php file to my site and then rename the admin folder again.

The other thing I have done before that had this effected the log in page was this:
I had changed the name of Admin in the zencart administration under tools>admin settings. I was altering my email to the clients email and thought i would change the admin name not realising this changes your login. So when I went to the login page I had to put a new name in the u/n instead of admin.

I noticed you have your log in page there and no error now.

If this is no answer there is an override you can find in the forum somewhere

'E-Start your web store' book - I Got it and now ..... I GET IT !....Well alot more of it anyway (-:

29 Jun 2009, 10:05 AM
#7
btman avatar

btman

New Zenner

Join Date:
Jun 2009
Location:
Wales UK
Posts:
92
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Make sure you change the configure.php permissions to 777 before saving, otherwise your changes will not be saved.
*
MODERATOR NOTE: Be sure to set the permissions back to read-only again after saving.*

29 Jun 2009, 10:37 AM
#8
alfieromeo avatar

alfieromeo

New Zenner

Join Date:
Jun 2004
Posts:
7
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

After following the steps in the email, i too have a problem:

Hello. Thank you for loading Zen Cart™.
You are seeing this page for one or more reasons:

  1. This is your first time using Zen Cart™ and you haven't yet completed the normal Installation procedure.
    If this is the case for you, you will need to upload the "zc_install" folder using your FTP program, and then run zc_install/index.php via your browser (or reload this page to see a link to it).

  2. Your /includes/configure.php and/or /admin/includes/configure.php file contains invalid path information and/or invalid database-connection information.
    If you recently edited your configure.php files for any reason, or maybe moved your site to a different folder or different server, then you'll need to review and update all your settings to the correct values for your server.
    See the Online FAQ and Tutorials area on the Zen Cart™ website for assistance.

i assume that it's to do with my configure.php file but i have made the changes listed and re-uploaded checking the permissions. is there something else that needs to be done that was omitted from the email?

cheers

29 Jun 2009, 2:05 PM
#9
violent_vanilla avatar

violent_vanilla

New Zenner

Join Date:
Nov 2008
Posts:
22
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Hello

I have the same problem, I have tried to re install a fresh copy of the configure php file but nothing seems to change & I still can not log into my admin site.

Does any one know what is causing this problem & how to fix it.

Any help would be much appreciated
Thank you
:dontgetit

29 Jun 2009, 3:18 PM
#10
btman avatar

btman

New Zenner

Join Date:
Jun 2009
Location:
Wales UK
Posts:
92
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

I forgot to change permissions for the configure.php file so when you think the edited version is being saved, it actually isn't.

29 Jun 2009, 5:22 PM
#11
rayl avatar

rayl

New Zenner

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

Re: Unabe to log into Admin after renaming admin folder

btman:

I forgot to change permissions for the configure.php file so when you think the edited version is being saved, it actually isn't.

I renamed my original "configure.php" file to "configure.php_ORG" successfully. The I copied "configure.php_ORG" to my computer. I edited it exactly as the instructions said. Then I copied it to a new filename: "configure.php" and transferred that file back to the website. So, permissions were not involved, as I was doing the editing on my local machine, not on the website server. I cannot log into the admin section anymore.

I changed everything back to the original. I still cannot log back into the admin section. It seems like every little edit breaks something.

I use Notepad++ to edit with. And yet, every little edit breaks something. My admin section, in the title bar of my browser (FF) says "TITLE". It used to say "Zen Cart!", but I wanted it to say "ADMIN-my site name" so the tab would be easier to find. Now, I cannot even get it to revert to "Zen Cart!"

Did I mention that every little edit I make seems to break something? :frusty:

30 Jun 2009, 12:58 AM
#12
angst avatar

angst

New Zenner

Join Date:
Dec 2008
Posts:
62
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

In the same "H E double hockey sticks" here.
After making the changes per the Tutorial and getting an epic fail I tried to revert to my backups and I still can't get into the admin section with either the new or old name.

The messages I get in a browser when I'm trying to log in are
Cannot send session cookie - headers already sent by (output started at /home/content (snip)
Cannot send session cache limiter - headers already sent (output started at /home/content (snip)
Cannot modify header information - headers already sent by (output started at /home/conten (snip)

Im taking a wild guess that what has broken the whole operation is that perhaps you have to manually log out of admin to make all the changes.
Anyone think that this could be why so many of us are having failures making the changes and also failures trying to change back?

30 Jun 2009, 10:52 AM
#13
violent_vanilla avatar

violent_vanilla

New Zenner

Join Date:
Nov 2008
Posts:
22
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

Hello :D

Thought you might like to know the problem can be fixed.

In my FTP client I found 2 configure.PHP files, it turns out you have to change both of them, they don't automaticly update the changes you make in wordpad ect

Also if you have a www. folder make sure you make the changes there as well & your admin will come back. No information gets lost & you can carry on as normal.

30 Jun 2009, 11:19 AM
#14
violent_vanilla avatar

violent_vanilla

New Zenner

Join Date:
Nov 2008
Posts:
22
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

It worked for a little while & now my site has gone :(

I really have no idea what I am meant to do, This is getting so annoying.

Can anyone help me please or know what the problem is ?

30 Jun 2009, 1:25 PM
#15
angst avatar

angst

New Zenner

Join Date:
Dec 2008
Posts:
62
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

I found the problem for me.
It was that the bottom of the configure php file had blank lines.

If when you open your configure php file and it looks like this...

then hit backspace until the cursor is up to the last line of code

save the file and upload again (don't forget the chmod settings)

30 Jun 2009, 2:00 PM
#16
alfieromeo avatar

alfieromeo

New Zenner

Join Date:
Jun 2004
Posts:
7
Plugin Contributions:
0

Re: Unabe to log into Admin after renaming admin folder

that's good advice angst and something i'd forgotten about but it's still not working for me. there is something wrong or overlooked in those update instructions. that's all i can think of for so many people to be having problems.

30 Jun 2009, 9:40 PM
#17
thx2012 avatar

thx2012

New Zenner

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

Re: Unabe to log into Admin after renaming admin folder

  • zen-cart-v1.3.8a-full-fileset-12112007
  • installed security patch
  • installed easy populate
  • Changed admin folder name

After changing my admin name, I receive the message regarding 2 options for viewing that message... 1, first time users have to use the install; and 2, modify /includes/configure.php...

I don't have the configure.php file that everybody seems to have and am not sure what to do.

In the following directories, I have these type of configuration files:

/includes/ **
dist-configure.php (no option to rename /admin/ here)
**
/admin/includes/

dist-configure.php (/admin/ is here)

I even did a global search for /admin/ within those 2 directories and could not find any relevant match. one mention was within a comment string and the other was in the message being displayed when I try to login.

Now, when I change the /admin/ over to the /newname/, I still have that message displayed and I can not proceed...

Please help!

:frusty:

1 Jul 2009, 4:05 AM
#18
thx2012 avatar

thx2012

New Zenner

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

Re: Unabe to log into Admin after renaming admin folder

I just re-downloaded the software, and started over....

The configure.php file now exists... Must of had a corrupt download/upload the 1st time...

Sorry for the multiple post, I had several tabs open and was not sure which one was the appropriate one... you can delete as seen fit...

:blink:

17 Jul 2009, 2:19 PM
#19
pts3227 avatar

pts3227

New Zenner

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

Re: Unabe to log into Admin after renaming admin folder

Music Man:

Thanks for the response.....

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

MM

When I first went to my admin folder to rename it I had no configure.php file, just the "dist-configure.php" file. everything in it matched what they said to chage so I chaged it and went thru everything else like it said, uploaded the file, went to my file manager and changed it there as well. i can get to the login screen and it will take the login and password but then it goes to an error screen (404).

When I go into my file manager I do have the configuration.php file, so I then tried to download the file into my admin folder so I would have it to modify and it looks nothing like what they said to modify.

What on earth am I doing wrong?!?!?!? :frusty: :frusty: :frusty: :(

Please help ASAP I can't get into my cart to add inventory at all.

17 Jul 2009, 5:24 PM
#20
pts3227 avatar

pts3227

New Zenner

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

Re: Unabe to log into Admin after renaming admin folder

thx2012:

I just re-downloaded the software, and started over....

The configure.php file now exists... Must of had a corrupt download/upload the 1st time...

Sorry for the multiple post, I had several tabs open and was not sure which one was the appropriate one... you can delete as seen fit...

:blink:

I have had the same problem as everyone here, if I download and start over will it mess up my templates and all my settings? I don't want to have to start completely over, i have a back up of my cart so i'm not worried about the data, but all the templates and different things ive added like modules...