Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Moving a store within the same host

Moving a store within the same host

Views: 2,157

Results 1 to 14 of 14
31 Mar 2015, 11:33 AM
#1
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Moving a store within the same host

Hi,

While I was waiting for a client to transfer his domain name to the hosting company that I use, I set up his zencart store in a subdomain of my own site (only about 2 weeks ago). Everything is correctly set up and working fine.

Now we've transferred his domain name, and I've copied all files from the subdomain down to my local machine and then up to his webspace.

I've updated everything in both configuration files (includes/configure.php and admin/includes/configure.php) to point to the new paths. I've checked and double-checked - all paths are correct.

Access to the db hasn't changed in any way - same db name, same password, etc.

Yet when I browse to the new site I get the zc-install message. I know I could go through the process of doing a new install, etc. as per tutorial 100, but I'm really curious as to why the current set-up isn't working. (I'd rather spend twice as long figuring this out this out than do a new install :blush: )

Can anyone think of anything I might have missed?

Many thanks,

WP.

31 Mar 2015, 11:41 AM
#2
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

Just to confirm the lines I've changed in each of the configuration files:

From admin/includes/configure.php

define('HTTP_SERVER', 'http://www.newsite.com');
define('HTTPS_SERVER', 'https://www.newsite.com');
define('HTTP_CATALOG_SERVER', 'http://www.newsite.com');
define('HTTPS_CATALOG_SERVER', 'https://www.newsite.com');

define('DIR_FS_SQL_CACHE', '/new path/cache');

From includes/configure.php

define('HTTP_SERVER', 'http://www.newsite.com');
define('HTTPS_SERVER', 'https://www.newsite.com');

define('DIR_FS_CATALOG', '/new path/');
define('DIR_FS_LOGS', '/new path/logs');

define('DIR_FS_SQL_CACHE', '/new path/cache');

31 Mar 2015, 11:45 AM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Moving a store within the same host

Database credentials? A database you created under your account most likely isn't accessible under your client's.

31 Mar 2015, 12:17 PM
#4
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

Thanks lat9,

Both sites are in my account - I own the subscription and have multiple sites set up under that subscription. I'm thinking that would make the db accessible from both sites, but I'm open to correction on that.

Forgot to say, I also went into the db and corrected the entries in the Configuration table for STORE_PAGE_PARSE_TIME_LOG and SESSION_WRITE_DIRECTORY as they had the old values.

31 Mar 2015, 12:46 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Moving a store within the same host

The zc_install "message" contains some broad hints to identify why the message was displayed (paths in configure.php or database credentials). What hints does the message you're receiving contain?

31 Mar 2015, 1:01 PM
#6
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

The zc_install message is as follows - it seems to be quite generic, rather than giving any specific reasons why this particular installation is giving problems.

I've checked everything in the config files, and the db connection info hasn't changed in any way.

I've also one through everything here: http://www.zen-cart.com/content.php?160 but it all seems to check out correctly.

Attachment #15112

31 Mar 2015, 1:47 PM
#7
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Moving a store within the same host

See the bit under item #3: DIR_FS_CATALOG not valid or not set.

31 Mar 2015, 2:25 PM
#8
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

That is set though, and is the same configuration as the original one, but with the path updated.

//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/correct/path/to/store/root/folder/');

It's really frustrating. Everything seems to check out, and yet there's some little thing somewhere that's stopping it all from coming together.

Maybe I'll save all my existing files and go through the process of doing a fresh install, then I can see what's different. I really want to know!

1 Apr 2015, 11:07 AM
#9
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Moving a store within the same host

That message (DIR_FS_CATALOG not valid or not set) is displayed if either there is no DIR_FS_CATALOG defined (which it is) or if there is no 'includes/classes' directory found "under" the DIR_FS_CATALOG.

Can you access the admin?

1 Apr 2015, 3:43 PM
#10
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

Thanks Lat9,

I can access the admin alright. There is an includes/classes/ folder in the store root, which contains 5 folders and 28 files.

Thing is, I FTP'd the entire file/folder structure down from where it existed and worked perfectly, then FTP'd it back up in its entirety to the new location. The only changes I needed to change (in theory) were the paths in the config files, and the couple of entries in the database that referred to paths.

Sigh!!!!

1 Apr 2015, 3:53 PM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Moving a store within the same host

Have you double-checked that the DIR_FS_CATALOG value in your admin's configure.php file matches that in your store?

2 Apr 2015, 1:28 PM
#12
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

I'm not sure what you mean - the DIR_FS_CATALOG value in configure.php is the store root folder. Or do you mean for me to check the DIR_FS_CATALOG value against something in the db?

2 Apr 2015, 4:07 PM
#13
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Re: Moving a store within the same host

Ok, I gave in and followed the recommended procedure.

I exported my working db, created a new db, reinstalled ZenCart, re-uploaded everything from my previous FTP download (except the two configuration files), imported everything into the new db and... it all works.

During the process, when I'd installed my new ZenCart, I checked the new config files. They had been created with a /29/ directory where the previous version had a /27/ directory. I don't know why that was different - obviously my website, which contained the old store as a subdomain, was installed in a different directory on the web server.

So I changed the /27/ in my previously uploaded files (which were now sitting in a directory called CopiedAcross) and added the /CopiedAcross/ directory to all my paths, and the old version worked too.

Obsessive? Me?? Nah, I don't know where you got that idea from!! :blink:

:D

2 Apr 2015, 5:40 PM
#14
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,080
Plugin Contributions:
56

Re: Moving a store within the same host

I'm glad you got it worked out!