Zen Cart Logo
Forums / Basic Configuration / Having problems moving store to subfolder

Having problems moving store to subfolder

Locked

Views: 1,891

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
14 Apr 2010, 4:57 PM
#1
spartan avatar

spartan

New Zenner

Join Date:
Jun 2008
Posts:
32
Plugin Contributions:
0

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?

14 Apr 2010, 6:00 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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)

14 Apr 2010, 8:04 PM
#3
spartan avatar

spartan

New Zenner

Join Date:
Jun 2008
Posts:
32
Plugin Contributions:
0

Re: Having problems moving store to subfolder

schoolboy:

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. :no:

14 Apr 2010, 8:17 PM
#4
spartan avatar

spartan

New Zenner

Join Date:
Jun 2008
Posts:
32
Plugin Contributions:
0

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. :frusty:

14 Apr 2010, 8:19 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Having problems moving store to subfolder

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

14 Apr 2010, 8:43 PM
#6
spartan avatar

spartan

New Zenner

Join Date:
Jun 2008
Posts:
32
Plugin Contributions:
0

Re: Having problems moving store to subfolder

DrByte:

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.

14 Apr 2010, 8:50 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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.

14 Apr 2010, 8:54 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

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/index.php?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.