Results 1 to 10 of 10
  1. #1
    Join Date
    Oct 2009
    Posts
    15
    Plugin Contributions
    0

    Default Renaming Admin - instructions are different than what's in the files

    Okay so I'm doing searches for this as it MUST be in this forum SOMEwhere and I am just not finding it yet!

    (It seems to me that maybe this is also a small bug, and it should have a different tutorial link in the installs for the newer versions)

    I'm trying to secure a brand new install of the latest release (1.5.0)

    I wish to rename the admin dir ... as i normally do.

    The instructions that you find on THIS page: zc_install/index.php?main_page=finished

    ...say the following:

    NEXT STEPS
    For security, YOU NEED TO RENAME your /admin/ folder to a name less likely to be 'guessed' by someone probing your site for illegitimate access. There's an FAQ article on Renaming Your Admin Folder which will guide you through the simple steps.

    Also for security, you will need to reset permissions on your configure.php files located in the /admin/includes/ and /includes/ folders back to read-only mode before allowing people to access your store.


    when you click on the link for the instructions: https://www.zen-cart.com/tutorials/index.php?article=33 it says there:

    Change ONLY THE WORD admin, in 3 places, AS SHOWN HERE:


    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/');





    However the configure.php file on MY server after install says:


    define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_CATALOG', '/****/');
    define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_HTTPS_CATALOG', '/****/');



    And


    define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
    define('DIR_FS_CATALOG', '/home/****/public_html/****/');



    And

    define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
    define('DIR_FS_CATALOG', '/home/alyssak/public_html/****/');



    Soooooooooo should I replace ...

    preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '

    and

    preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '

    and

    realpath(dirname(__FILE__) . '/../') . '



    ... with '/NewSecretAdminDirName


    Just seems like those are instructions for an older configure.php file that was a bit simpler ... and not for what is actually included in the new installations, so it left me a little unsure of how to best proceed without breaking the store right out the gate. lol

    I'll keep searching to see if I can find the answer myself, I'm SURE this HAS to have been addressed at leas a few times already by now!

    Oh and I wasn't really quite sure where the best place to post this question would be (as this isn't an upgrade install, but a fresh install of 1.5.0) if it needs to be moved I understand and sorry if I guessed incorrectly!
    Last edited by AlyssaKay; 1 Jan 2012 at 10:51 PM.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Renaming Admin - instructions are different than what's in the files

    You'll also note that in the article 33 tutorial, the whole step about editing configure.php is prefaced with a note to skip that step if you're using v1.5.0
    .

    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.

  3. #3
    Join Date
    Oct 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: Renaming Admin - instructions are different than what's in the files

    Aw hell. You are so right! Somehow my eye skimmed RIGHT over that purple bolded text even though it was RIGHT there!

    I am ashamed!

    Thank you!

  4. #4
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Renaming Admin - instructions are different than what's in the files

    This is one of the sweet things about 1.5. No more futzing with the configure.php files when renaming the admin. I also love the fact that it won't even let you login to admin until you do.

  5. #5
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Renaming Admin - instructions are different than what's in the files

    On the same subject... Do I have to rename the admin as it was in 1.3.9 versions or does it done automatically?

  6. #6
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Renaming Admin - instructions are different than what's in the files

    In 1.39 you need to rename the admin folder and edit the configure.php files to reflect the new name.

  7. #7
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Renaming Admin - instructions are different than what's in the files

    Quote Originally Posted by RescoCCC View Post
    In 1.39 you need to rename the admin folder and edit the configure.php files to reflect the new name.
    That is not what I am asking.... I am asking on the new version 1.5 do I need to rename the admin folder just like I did in 1.3.9 version for security?

  8. #8
    Join Date
    May 2010
    Location
    WA State
    Posts
    1,678
    Plugin Contributions
    3

    Default Re: Renaming Admin - instructions are different than what's in the files

    Quote Originally Posted by bkeaton View Post
    That is not what I am asking.... I am asking on the new version 1.5 do I need to rename the admin folder just like I did in 1.3.9 version for security?
    You still need to rename it. In fact, you can't login until you do.

  9. #9
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Re: Renaming Admin - instructions are different than what's in the files

    Quote Originally Posted by RescoCCC View Post
    You still need to rename it. In fact, you can't login until you do.
    That is what I thought

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Renaming Admin - instructions are different than what's in the files

    A curious chicken-and-egg situation: You can't login to the admin until its folder name is changed (and zc_install deleted), but the admin link from the installation success page doesn't work after the folder is renamed.

    The installation success link should reflect something of this so that new users aren't faced with a predictable error or scary warning as their first interaction with their new admin. Something to think about for the next update...

 

 

Similar Threads

  1. Installed the FEC mod and now the GiftWrap mod - files are different, do you merge?
    By pityocamptes in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 23 Mar 2012, 06:37 PM
  2. Replies: 1
    Last Post: 16 Mar 2011, 07:11 PM
  3. what files are involved with calculating the order totals
    By zubenubi in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 8 Jan 2010, 11:13 PM
  4. What files are required to create an admin module from scratch?
    By mohammedsk in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 2 Jan 2010, 10:56 PM
  5. What are the roles of CSS, Admin, and tpl_ files in design?
    By jbalcony in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Nov 2008, 04:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR