Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2011
    Location
    In a green and pleasant land
    Posts
    46
    Plugin Contributions
    0

    link problem Rename Admin Folder not working for me

    I've just tried renameing my admin folder as described in the tutorial
    https://www.zen-cart.com/tutorials/index.php?article=33

    This says that in 1.5 you need make no changes to the configuration.php file.

    However, when I change the folder name, the login fails with a 404 error.

    In the configuration.php file there is a section that still describes the location of the admin folder and it is still set to the original value

    Surely this needs changing as well?

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

    Default Re: Rename Admin Folder not working for me

    1. Is this a fresh NEW install, or is it an upgrade? Are your configure.php files NEW?
    2. The file name is "configure.php", not "configuration.php". There is indeed a "configuration.php" file and that should NEVER be touched. Don't mix them up or you'll definitely get errors. They're completely different.

    If you're truly using a fresh new install of v1.5.0 and DID NOT copy old configure.php files from a prior version, then ALL you need to do is rename the admin folder, and NOT TOUCH the configure.php file. Of course, once you rename the admin folder you need to use the new foldername in your browser's address bar, else you'll get a 404 error (404 means "not found") because the old address you were going to is indeed "not found" because you renamed it to something else.
    .

    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
    Mar 2011
    Location
    In a green and pleasant land
    Posts
    46
    Plugin Contributions
    0

    Default Re: Rename Admin Folder not working for me

    This is a NEW install - I had to completely remove the old version because my ISP's upgrade routine failed and left me with an unusable store.
    After the instal was complete, I have a configure.php file in my admin/includes folder

    Inside this file are a number of references to a folder called zc_admin - which is what the original install called my admin area.
    Once i changed the name, this file did not change and when I try to login I get the following message

    Not Found

    The requested URL /zc_admin/login.php was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request


    Does this mean that the installer I am using from my ISP (through Fantastico) is faulty?

  4. #4
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Rename Admin Folder not working for me

    Can you post the following section of your admin/includes/configure.php?
    Code:
    // 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)
      $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];
      
      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', '/');
    
      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_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)
      define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
      define('DIR_FS_CATALOG', '/home/username/public_html/');
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  5. #5
    Join Date
    Mar 2011
    Location
    In a green and pleasant land
    Posts
    46
    Plugin Contributions
    0

    Default Re: Rename Admin Folder not working for me

    Quote Originally Posted by barco57 View Post
    Can you post the following section of your admin/includes/configure.php?
    Code:
    // 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)
      $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];
      
      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', '/');
    
      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_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)
      define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');
      define('DIR_FS_CATALOG', '/home/username/public_html/');

    Mine is

    // 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)
    $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];


    define('DIR_WS_ADMIN', '/zc_admin/');
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_ADMIN', '/zc_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)
    define('DIR_FS_ADMIN', '/home/equin125/public_html/zc_admin/');
    //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/equin125/public_html/');

  6. #6
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Rename Admin Folder not working for me

    Ok, your fantastico install is not putting in the correct stuff for v1.5 so that the new admin folder can used in the way it was intended.
    The quickest fix is to change zc_admin in that config file to your new admin folder name otherwise you could copy in the correct code for the file so it works as originally intended. You can see what is supposed to be there in my example above.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  7. #7
    Join Date
    Mar 2011
    Location
    In a green and pleasant land
    Posts
    46
    Plugin Contributions
    0

    Default Re: Rename Admin Folder not working for me

    Thanks for your help

    I've used the option of overwriting the folder names because when I pasted in your code, I could only get to the "You are seeing this page....." telling me that I hadn't finished the install. And since all my install files had been removed during the installation, there was nothing else I could do.

    I guess my major worry is what else it screwed up on - although the admin panel looks to be a new version and the database has also changes.

    Is there any quick thing I can check to see if the install looks OK?

    John

    Anyone else using HostPapa - please be aware, the upgrade path doesn't work and the fresh install is obviously faulty too.

  8. #8
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Rename Admin Folder not working for me

    Well, when you copied "my code" into your config file you probably didn't make any adjustments for the define('DIR_FS_CATALOG', '/home/username/public_html/'); line and left it that way instead of making sure it said define('DIR_FS_CATALOG', '/home/equin125/public_html/'); which would cause you to get the page that says "You are seeing this page....."
    Thats probably the only thing that was wrong being it was a new install, fantastico just hasn't adjusted their installer to deal with the difference between admin config file in 1.5 vs earleir versions.....Knowing something about installers like that I can see where they would have a problem because they probably offer multiple versions of Zen Cart to install and since they only want to have one underlying installer they use the old method
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Rename Admin Folder not working for me

    Quote Originally Posted by kbear View Post
    Does this mean that the installer I am using from my ISP (through Fantastico) is faulty?
    If it says it's installing v1.5.0 but it's generating pre-1.5.0 configure.php file contents, then yes it's faulty. Report it to Fantastico directly: https://netenberg.com/#customer.html
    .

    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.

 

 

Similar Threads

  1. Log in after rename Rename "admin" folder does not work
    By flashmxfreak in forum General Questions
    Replies: 3
    Last Post: 3 Sep 2011, 12:38 PM
  2. developers tool kit not working after admin rename?
    By MB1 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 15 Nov 2009, 05:15 PM
  3. logoff.php was not found on this server (after rename admin folder)
    By dan_710 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 23 Jan 2009, 04:50 PM
  4. Admin Folder Rename Not Working for me
    By J. Smith in forum General Questions
    Replies: 2
    Last Post: 25 Feb 2008, 03:57 AM
  5. Rename Admin folder instructions does not work - did something wrong
    By ronwong in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 4 Dec 2006, 11:49 AM

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