Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2008
    Posts
    32
    Plugin Contributions
    0

    Default Having problems moving store to subfolder

    Hey, Im trying to implement the Ceon URI direct links mod, but I do not want my zencart as my homepage. That being the case, I have to put it in a subfolder, or it will rename all my urls causing zencart to be my homepage.

    So, zencart was in my root, but I created a subfolder under '/main/cart', and I copied everything to that folder.
    I modified the includes/configure.php and admin/includes/configure.php, as specified in the FAQ as quoted here:
    4.Your /includes/configure.php and /admin/includes/configure.php files are used to point Zen Cart™ to the right folders. In those files, you need to update several entries to match the new path information:
    ◦DIR_WS_CATALOG
    ◦DIR_WS_HTTPS_CATALOG
    ◦DIR_FS_CATALOG
    ◦DIR_FS_SQL_CACHE
    ◦DIR_WS_ADMIN (in admin)
    ◦DIR_WS_HTTPS_ADMIN (in admin)
    ◦DIR_FS_ADMIN (in admin)
    My admin works, but all I get when trying to go to the store is this:
    "[an error occurred while processing this directive] "

    [note, the path and admin is actually a little different, but Im using 'cart' and 'admin' here for security purposes.]

    Here are some snippets:

    includes/configure.php:
    define('DIR_WS_CATALOG', 'main/cart/');
    define('DIR_WS_HTTPS_CATALOG', 'main/cart/');

    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/spartan1/public_html/main/cart/');

    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('DIR_FS_SQL_CACHE', '/home/spartan1/public_html/main/cart/cache');
    admin/configure.php
    define('DIR_WS_ADMIN', 'main/cart/admin/');
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_ADMIN', 'main/cart/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/spartan1/public_html/main/cart/admin/');
    On the admin above, I also tried changing the following as in the standard configuration.php, but no change.
    DIR_WS_CATALOG
    ◦DIR_WS_HTTPS_CATALOG
    ◦DIR_FS_CATALOG

    Any ideas of what might be causing my error?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: Having problems moving store to subfolder

    Try getting rid of main


    EG:
    define('DIR_WS_ADMIN', '/cart/admin/');

    leave the leading slash (RED above)
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Having problems moving store to subfolder

    Quote Originally Posted by schoolboy View Post
    Try getting rid of main


    EG:
    define('DIR_WS_ADMIN', '/cart/admin/');

    leave the leading slash (RED above)
    Nope. No luck. I also tried creating it in the root under a cart folder, so I tried both

    /cart/

    and cart/

    But I get the same error. Nothing seems to affect it.

  4. #4
    Join Date
    Jun 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Having problems moving store to subfolder

    I just checked my error logs and found the following:

    [Wed Apr 14 15:10:37 2010] [error] [client 153.2.246.31] unable to include "_mgxroot/index.html" in parsed file /home/spartan1/public_html/cart/index.shtml
    [Wed Apr 14 15:10:37 2010] [error] [client 153.2.246.31] File does not exist: /home/spartan1/public_html/cart/_mgxroot/index.html

    So I assumed the problem had something to do with the index.shtml. I saw it included the path "_mgxroot/index.html"
    So, since my store was now in a subfolder to it rather than a root of it, I changed it to "//_mgxroot/index.html"

    Now if I try to go to the cart it goes to my homepage instead.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Having problems moving store to subfolder

    Zen Cart has nothing to do with a "_mgxroot" file or folder, and uses no .shtml files.
    .

    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.

  6. #6
    Join Date
    Jun 2008
    Posts
    32
    Plugin Contributions
    0

    Default Re: Having problems moving store to subfolder

    Quote Originally Posted by DrByte View Post
    Zen Cart has nothing to do with a "_mgxroot" file or folder, and uses no .shtml files.
    My zencart is installed in the root.
    IF you go to the standard level of where my index.html, and other webpages are at, that is the "_mgxroot" aka "main" folder.
    That is where Im trying to move it to. Under the main folder, then a subfolder like "cart".

    The index.shtml must have to do w/ zencart (or at least one of its add-ons) as that error is thrown whenever I try to go to the relocated store.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Having problems moving store to subfolder

    Zen Cart truly has nothing to do with "index.shtml".
    However, it's possible that you're trying to access a non-existent file, and therefore your server's own configuration is redirecting you to an error page called index.shtml.
    I'm certain that those references are a result of you having files in the wrong place, and the server is just trying to respond to the error condition you've created.
    .

    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.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Having problems moving store to subfolder

    The simplest way for you to do all of what you're trying to do is this:

    1. Put it all back the way it was.
    2. Create the new folder where you want to move your Zen Cart files into.
    3. Upload a CLEAN set of original Zen Cart files, including zc_install, into that folder.
    4. Create a temporary dummy mysql database.
    5. Run zc_install in this new temporary folder, using the new temporary database.
    6. Test that it works in that folder.
    7. Copy the configure.php files from that new folder and use them to replace the configure.php files in your working Zen Cart.
    8. Delete the temporary folder contents and temporary database.
    9. Move your live Zen Cart files into that temporary folder.
    10. Run fix_cache_key (from the addons area) to repoint your sessions storage folder.

    Done. It'll take you all of 10 minutes to do, and maybe 1 minute of store downtime for the final switch.

    Basically the same process as moving to another server, as per this FAQ: https://www.zen-cart.com/tutorials/i...hp?article=100

    That way you can stop guessing what to change or making errors while trying to edit things, or futzing with permissions before saving edits.
    .

    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. Problems moving from subfolder to root
    By innovcap in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 23 Jul 2012, 04:51 PM
  2. All FREE download only store - Having problems
    By kstew923 in forum General Questions
    Replies: 3
    Last Post: 13 Mar 2011, 02:36 PM
  3. Having store email problems!!
    By gaffettape in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 24 Jul 2009, 02:53 PM
  4. Having trouble moving site from subfolder up to root of domain
    By Tom_Ace in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 22 Oct 2008, 05:03 AM
  5. Moving ZC from root to subfolder
    By TheRaven in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 13 Mar 2008, 04:40 AM

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