Zen Cart Logo
Forums / General Questions / Open a backup copy on LocalHost

Open a backup copy on LocalHost

Views: 4,397

Results 41 to 50 of 50
15 Feb 2012, 6:53 PM
#41
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Open a backup copy on LocalHost

Well I finally found a handful of corrupted files in my back-up files.

Once those were replaced with good files everyhing worked properly.

Thanks for the help.

30 May 2012, 2:35 PM
#42
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Open a backup copy on LocalHost

Instead of starting yet another thread I thought it best to resurrect this one.

After trying to install an SEO mod on my local copy I created and an ungodly mess and started from scratch.
I deleted the existing local copy and reinstalled a fresh copy of ZC 1.39H

Store demo works fine and dandy.
Created a full backup from my live site.
I've tried to copy the the files from the back-up copy and cannot figure out why I cannot get this right.

The back-up copy of my site contains a file folder named public_html.
The local copy of ZC does not.

I can't for the life of me figure out where in the heck I'm supposed to copy the public_html folder or files to sense this folder does not appear in the local copy on my PC.

I've tried just about everything I can think of and I cannot get the files copied to the correct area.

Yes I've run fix_cache_key.
Yes I made sure to keep the /includes/configure.php and /CUSTOMADMIN/configure.php from the fresh install.

All I get after moving the files is a white screen and no entries in the cache folder (debugg log)

I know this may seem second nature to you folks, but I simply don't do this stuff on a daily basis. It's got to be something simple because I've done this before.

30 May 2012, 3:30 PM
#43
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: Open a backup copy on LocalHost

I've tried to copy the the files from the back-up copy and cannot figure out why I cannot get this right

I'm not sure of your methods but what I do is have a duplicate of public_html and everything below it, on my local server.
I then use Beyond Compare to compare the entire structure of the local and remote fileset in real time so you can clearly see what is what, and easily copy/correct/delete what is not right.
The only thing that should be different is the two configure files which will have different path information and (probably) database details for the two sites (ditto for the mysql backup mod).
You can if you wish also create local versions of the configure files which work as overrides, placed in includes/local in the local fileset only.
Thats the files sorted.

For the database, install the mysql backup into the admin and use that to pass copies of the db back and forth: no messing with phpadmin.
Run the fix cache key after the import.

30 May 2012, 4:07 PM
#44
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Open a backup copy on LocalHost

I guess I'm not explaining this well enough.

I've got a working copy of ZC running on my LOCALHOST but it does not contain a folder named public_html.

The backup copy of my live site does have a folder named public_html.

I've tried copying this folder (public_html) directly into my local copy of ZC and made sure the configure.php files that were generated during the localhost install replaced the copies that were in the public_html folder.

When I try to bring up the admin area on the local site I get nothing but a white screen. I enter the following in the URL bar:
http://localhost/zencart/CUSTOMADMINNAME/login.php

my /includes/CUSTOMADMINNAME/configure.php file:

define('HTTP_SERVER', 'http://localhost');
define('HTTPS_SERVER', 'https://localhost');
define('HTTP_CATALOG_SERVER', 'http://localhost');
define('HTTPS_CATALOG_SERVER', 'https://localhost');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');

// 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)
define('DIR_WS_ADMIN', '/zencart/CUSTOMADMINNAME/');
define('DIR_WS_CATALOG', '/zencart/');
define('DIR_WS_HTTPS_ADMIN', '/zencart/CUSTOMADMINNAME/');
define('DIR_WS_HTTPS_CATALOG', '/zencart/');

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', 'G:/xampp/htdocs/Zencart/CUSTOMADMINNAME/');
define('DIR_FS_CATALOG', 'G:/xampp/htdocs/Zencart/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'root');
define('DB_SERVER_PASSWORD', '');
define('DB_DATABASE', 'seriouso_zc1');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');
// for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', 'G:/xampp/htdocs/Zencart/cache');

When I try to bring up the LOCAL SITE I get nothing but a white screen. I enter the following in the URL bar:
http://localhost/zencart/Not2Day/index.php

my /includes.configure.php file:

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

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', 'G:/xampp/htdocs/Zencart/');

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 our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'root');
define('DB_SERVER_PASSWORD', '');
define('DB_DATABASE', 'seriouso_zc1');
define('USE_PCONNECT', 'false');
define('STORE_SESSIONS', 'db');
// for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', 'G:/xampp/htdocs/Zencart/cache');

I did not have any problems with the DB when I installed the fresh copy of ZC.

I've already run FIX_CACHE_KEY with no effect.

30 May 2012, 8:50 PM
#45
drbyte avatar

drbyte

Sensei

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

Re: Open a backup copy on LocalHost

Your question about "public_html" is a very basic website thing.

Some webservers use "public_html" as the DocumentRoot (sometimes referred to casually as the "web root" or the "root")
Other webservers use "htdocs"
Others use "www"
Others use "html"

They're all the same.

So in your case, your localhost server uses /htdocs/ so that's where you put all the contents of your live server's public_html folder.
DO NOT make a "public_html" folder on your localhost. That would be incorrect.

Live server = .../public_html/website-files-here
Localhost = .../htdocs/website-files-here

31 May 2012, 12:31 PM
#46
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Open a backup copy on LocalHost

I know that much.
The path to the site on my computer is xampp/htdocs/zencart/

I've put all of the contents from my downloaded back-up copy of my live site into that folder and the local site still looks like a brand-new zencart install. It doesn't look anything like my live site.

31 May 2012, 12:59 PM
#47
lat9 avatar

lat9

Administrator

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

Re: Open a backup copy on LocalHost

I noticed a small inconsistency in your "naming" of the folder from which your zen-cart runs. In some places in your configure.php file, you use /zencart/ and in other places you use /Zencart/. These two folder names are not equivalent and should reflect the name of the folder within your localhost/hosted location's file system.

31 May 2012, 1:22 PM
#48
serious avatar

serious

Totally Zenned

Join Date:
Feb 2011
Posts:
686
Plugin Contributions:
0

Re: Open a backup copy on LocalHost

I never noticed that before.
I just edited the configure.php files so that** zencart is now Z**encart...and it made no difference at all.

31 May 2012, 1:50 PM
#49
lat9 avatar

lat9

Administrator

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

Re: Open a backup copy on LocalHost

Serious:

...
When I try to bring up the admin area on the local site I get nothing but a white screen. I enter the following in the URL bar:
http://localhost/zencart/CUSTOMADMINNAME/login.php

When I try to bring up the LOCAL SITE I get nothing but a white screen. I enter the following in the URL bar:
http://localhost/zencart/Not2Day/index.php

Is your local copy of zen-cart in G:/xampp/htdocs/zencart or in G:/xampp/htdocs/zencart/Not2Day? If your store's installed in /zencart, then you should use http://localhost/zencart to access your store ...

Make sure that you've also updated your admin/includes/configure.php to use /zencart instead of /Zencart.

31 May 2012, 2:19 PM
#50
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Open a backup copy on LocalHost

Is your localhost database an accurate copy of the live db?
and
What template is selected in localhost admin?