Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Problem moving ZenCart to new folder

Problem moving ZenCart to new folder

Locked

Views: 1,152

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
21 Feb 2010, 8:23 PM
#1
lyte avatar

lyte

New Zenner

Join Date:
Feb 2010
Posts:
6
Plugin Contributions:
0

Problem moving ZenCart to new folder

Hi, I am very new to all things Zen so pls bear with me in my ignorance... I've read several posts about people moving their carts from lower level directories up to the site root, but I am attempting to move mine down - it was pre-installed for me in the top level, but since I just want to play around with it while I learn, I've moved it down a level into /shop/. Well I tried to follow the tutorial, and the home page has moved ok, and I can still log into admin, so 'back end' apparently looks ok. But if I try to click on any category on the home page I just get the error
"Not Found
The requested URL /index.php was not found on this server."

I can get to Site Map and Privacy Notice OK. (This is latest version of ZenCart btw.)

Obviously I have screwed something up but (though I'm not totally clueless) I don't know much PHP!!

Any suggestions very gratefully received
Thank you

21 Feb 2010, 10:37 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Problem moving ZenCart to new folder

The physical LOCATION of your ZC install is governed by the TWO configure.php files.

If/when you move your ZC installation into a sub-folder from the domain root, (or if you do the opposite), the only php files that need modifying are these two configure.php files.

One configure.php file governs the admin side of your installation (the part you use to manage the shop's back-end).

The other configure.php
file governs the catalog side of your installation (the part customers use).

While they are similar in most respects, these two files are NOT interchangeable. The configure.php for admin contains more information.


The following is relevant...

In admin/includes/configure.php

There are SEVEN edits to make:

(First Four)...

Lines 41 to 44 in a DOMAIN ROOT INSTALL will be

  define('DIR_WS_ADMIN', '/admin/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', '/admin/');
  define('DIR_WS_HTTPS_CATALOG', '/');

Lines 41 to 44 in a DOMAIN SUB-DIRECTORY INSTALL will be

  define('DIR_WS_ADMIN', '/foldername/admin/');
  define('DIR_WS_CATALOG', '/foldername/');
  define('DIR_WS_HTTPS_ADMIN', '/foldername/admin/');
  define('DIR_WS_HTTPS_CATALOG', '/foldername/');

(Fifth and Sixth)

Lines 60 and 61 in a DOMAIN ROOT INSTALL will be

  define('DIR_FS_ADMIN', '/home/acct_name/public_html/admin/');
  define('DIR_FS_CATALOG', '/home/acct_name/public_html/');

Lines 60 and 61 in a DOMAIN SUB-DIRECTORY INSTALL will be

  define('DIR_FS_ADMIN', '/home/acct_name/public_html/foldername/admin/');
  define('DIR_FS_CATALOG', '/home/acct_name/public_html/foldername/');

(Seventh)

Line 87 in a DOMAIN ROOT INSTALL will be

  define('DIR_FS_SQL_CACHE', '/home/acct_name/public_html/cache');

Line 87 in a DOMAIN SUB-DIRECTORY INSTALL will be

  define('DIR_FS_SQL_CACHE', '/home/acct_name/public_html/foldername/cache');


In includes/configure.php

There are FOUR edits to make:

(First Two)

Lines 25 to 26 in a DOMAIN ROOT INSTALL will be

  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

Lines 25 to 26 in a DOMAIN SUB-DIRECTORY INSTALL will be

  define('DIR_WS_CATALOG', '/foldername/');
  define('DIR_WS_HTTPS_CATALOG', '/foldername/');

(Third)

Line 41 in a DOMAIN ROOT INSTALL will be

  define('DIR_FS_CATALOG', '/home/acct_name/public_html/');

Line 41 in a DOMAIN SUB-DIRECTORY INSTALL will be

  define('DIR_FS_CATALOG', '/home/acct_name/public_html/foldername/');

(Fourth)

Line 65 in a DOMAIN ROOT INSTALL will be

  define('DIR_FS_SQL_CACHE', '/home/acct_name/public_html/cache');

Line 65 in a DOMAIN SUB-DIRECTORY INSTALL will be

  define('DIR_FS_SQL_CACHE', '/home/acct_name/public_html/foldername/cache');

Naturally, your COMPLETE PATH (/home/acct_name/public_html/foldername/) may differ radically from my example - depending on your host server setup.

In the above, foldername is the name you have given to the sub-directory where your ZC installation resides.

When you have altered the configure.php files, you must correct the CACHE LOCATION in the database, so login to your store admin console, and under configuration >>> sessions... Correct the COMPLETE PATH location of the cache folder.

This can also be done by running the fix-cache-key.php file that is available in the free-add-ons of this forum.


22 Feb 2010, 9:53 AM
#3
lyte avatar

lyte

New Zenner

Join Date:
Feb 2010
Posts:
6
Plugin Contributions:
0

Re: Problem moving ZenCart to new folder

Thanks for the excellent clear instructions, they made it easy to recheck my files - but they both seem fine? I'm pretty sure I have made the right changes. Could anything else be causing the "not found" error messages? Obviously index.php is in the right place because I can see it... but some path references must have got screwed up somehow.
(Am I just going to have to reinstall? Not a disaster since I don't have lots of data, but would be a pain!)

22 Feb 2010, 1:37 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Problem moving ZenCart to new folder

If a FILE is not being found then a file is probably missing or corrupted.

If you have no important data yet, it may be a good idea to FTP a fresh set of ZC to the desired location.

KEEP your current configure.php files (don't wverwrite these).

This should not be a problem anyway, because in a fresh set of ZC, these are called dist_configure.php and won't overwrite them.

Make a backup of the two configure.php files just in case.