Forums / General Questions / Moved to New Host and I broke It

Moved to New Host and I broke It

Views: 1,404

Results 1 to 12 of 12
27 Dec 2011, 4:50 AM
#1
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Moved to New Host and I broke It

This is so embarrassing. I even did a "test transfer" to make sure I was doing this right, but after attempting to move my customers store to a new server, the homepage now generates some odd code that I'm sure means something more to someone more savvy. Does this give any indication about what I overlooked or made a mistake with?

Load application_top.php - see {@tutorial initsystem} *
Set main language directory based on $SESSION['language']
/ require('includes/application_top.php'); $language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/'; $directory_array = $template->get_template_part($code_page_directory, '/^header_php/'); foreach ($directory_array as $value) { /* * We now load header code for a given page. * Page code is stored in includes/modules/pages/PAGE_NAME/directory * 'header_php.php' files in that directory are loaded now. / require($code_page_directory . '/' . $value); } /* * We now load the html_header.php file. This file contains code that would appear within the HTML code * it is overridable on a template and page basis. * In that a custom template can define its own common/html_header.php file / require($template->get_template_dir('html_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/html_header.php'); /* * Define Template Variables picked up from includes/main_template_vars.php unless a file exists in the * includes/pages/{page_name}/directory to overide. Allowing different pages to have different overall * templates. / require($template->get_template_dir('main_template_vars.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/main_template_vars.php'); /* * Read the "on_load" scripts for the individual page, and from the site-wide template settings * NOTE: on_load
.js files must contain just the raw code to be inserted in the tag in the on_load="" parameter. * Looking in "/includes/modules/pages" for files named "on_load_.js" / $directory_array = $template->get_template_part(DIR_WS_MODULES . 'pages/' . $current_page_base, '/^on_load_/', '.js'); foreach ($directory_array as $value) { $onload_file = DIR_WS_MODULES . 'pages/' . $current_page_base . '/' . $value; $read_contents=''; $lines = @file($onload_file); foreach($lines as $line) { $read_contents .= $line; } $za_onload_array[] = $read_contents; } /* * now read "includes/templates/TEMPLATE/jscript/on_load/on_load_*.js", which would be site-wide settings / $directory_array=array(); $tpl_dir=$template->get_template_dir('.js', DIR_WS_TEMPLATE, 'jscript/on_load', 'jscript/on_load_'); $directory_array = $template->get_template_part($tpl_dir ,'/^on_load_/', '.js'); foreach ($directory_array as $value) { $onload_file = $tpl_dir . '/' . $value; $read_contents=''; $lines = @file($onload_file); foreach($lines as $line) { $read_contents .= $line; } $za_onload_array[] = $read_contents; } // set $zc_first_field for backwards compatibility with previous version usage of this var if (isset($zc_first_field) && $zc_first_field !='') $za_onload_array[] = $zc_first_field; $zv_onload = ""; if (isset($za_onload_array) && count($za_onload_array)>0) $zv_onload=implode(';',$za_onload_array); //ensure we have just one ';' between each, and at the end $zv_onload = str_replace(';;',';',$zv_onload.';'); // ensure that a blank list is truly blank and thus ignored. if (trim($zv_onload) == ';') $zv_onload=''; /* * Define the template that will govern the overall page layout, can be done on a page by page basis * or using a default template. The default template installed will be a standard 3 column layout. This * template also loads the page body code based on the variable $body_code. */ require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page.php'); ?>

////// **LeatherJacketMedia.com**
"I'm no Zen Cart expert, but I did sleep at a Holiday Inn Express last night."

27 Dec 2011, 5:46 AM
#2
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Moved to New Host and I broke It

was you trying to move the actual store to another server?

27 Dec 2011, 5:51 AM
#3
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Moved to New Host and I broke It

Yes. I exported the database and moved it from one server to another. Then I moved all my store files from one server to another. I did this successfully on a "test" site to make sure my protocols were correct and in order, but I must have overlooked something when doing it again on the actual store.

////// **LeatherJacketMedia.com**
"I'm no Zen Cart expert, but I did sleep at a Holiday Inn Express last night."

27 Dec 2011, 5:53 AM
#4
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Moved to New Host and I broke It

what is the web address that you are referring too?

27 Dec 2011, 6:36 PM
#5
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Moved to New Host and I broke It

I sent that web address to you privately. I didn't want to post it in the forum.

////// **LeatherJacketMedia.com**
"I'm no Zen Cart expert, but I did sleep at a Holiday Inn Express last night."

28 Dec 2011, 3:19 AM
#6
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Moved to New Host and I broke It

Ok,,, I have looked at your site and it says "Page Not Found"

28 Dec 2011, 3:44 AM
#7
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Moved to New Host and I broke It

Yes, I'm working on it now. You caught me in the middle of it.

The strange part is that I uploaded a fresh install (using the same version), then I imported the database, then uploaded my own custom files/templates and it seemed to work (on the "test" folder).

But then tonight, I changed the path from the "test folder" my store in the configuration files to the correct store folder, and now I'm getting this error. Seems odd to me since nothing changed except the root folder name in the config files.

I'll try to get closer on the problem. I think it's impossible for anyone to help right now until i get a weee bit closer to figuring out what's happening.

////// **LeatherJacketMedia.com**
"I'm no Zen Cart expert, but I did sleep at a Holiday Inn Express last night."

28 Dec 2011, 3:47 AM
#8
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Moved to New Host and I broke It

ok,,, is the TMD is your root folder on the server?

28 Dec 2011, 5:17 AM
#9
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Moved to New Host and I broke It

*** SOLVED ***

Yes, TMD is the root folder. I have since solved the problem since your post. I will share here for anyone else who stumbles on a similar problem. In short the problem arose from a config setting (as is most always the case). I'm not sure how I overlooked it or what changes occurred from the test folder to the actual store folder, but after fixing this:

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

...it all worked. For the 2nd and 4th line above, I had the test folder listed, but because I was testing, I also had my server info listed in this line towards the top of the config file:

define('HTTP_SERVER'...

rather than a domain path. The combination caused a mess, but I sorted it out.

I am grateful for you chiming in to offer assistance. The Zen Cart community is incredible. Having never moved a whole store (which equates to hundreds of man hours) to a new server, this was frightening, but honestly turned out to be a snap in retrospect.

I can easily say that if I can do this, so can anyone else.

:clap:

////// **LeatherJacketMedia.com**
"I'm no Zen Cart expert, but I did sleep at a Holiday Inn Express last night."

28 Dec 2011, 9:47 AM
#10
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Moved to New Host and I broke It

sportbiker:

Having never moved a whole store (which equates to hundreds of man hours) to a new server, this was frightening, but honestly turned out to be a snap in retrospect.

Everyone goes through the learning curve. Our "record" for moving an entire store to a new server is 4 minutes 18 seconds - but we are on a fibre-optic broadband connection at 100MBS.

:D

20 years a Zencart User

28 Dec 2011, 5:44 PM
#11
sportbiker avatar

sportbiker

Zen Follower

Join Date:
Aug 2008
Location:
Southern California
Posts:
127
Plugin Contributions:
0

Re: Moved to New Host and I broke It

I have to admit, I'm feeling cocky now. I may try to beat that record of yours when I move another store next week!

////// **LeatherJacketMedia.com**
"I'm no Zen Cart expert, but I did sleep at a Holiday Inn Express last night."

28 Dec 2011, 11:47 PM
#12
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Moved to New Host and I broke It

Having never moved a whole store (which equates to hundreds of man hours) to a new server, this was frightening

I grok this. I've moved Zen Cart sites, Wordpress Blogs, phpBB installs. No real problems, BUT. This past weekend I moved a client site who doesn't use open source, but rather a commercial cart as well as a commercial newsletter program - both of which I did not install. I was a complete wreck before and during the move.

The best way to learn is to try stuff. But, back it up first.