Skip to main content
J Cellini
Inspiring
March 9, 2010
Question

web pages not showing up after tranferring files to new server

  • March 9, 2010
  • 2 replies
  • 660 views

I am working on a Zen Cart web site for the first time. I did my authoring on a different server and everything worked fine. I transferred my files to a new server and now my web pages do not display. I can't understand it; everything is the same but on a different server. This is the first time that I have worked on an entirely php web site.

My first thought is that the path was wrong. I deleted the index.php from the remote server and created a testing index.html page. The page showed up fine. But for some reason, the index.php page is not showing and when I check the source code, it's empty. All the paths seem to be right to the includes seem to be correct. Here is the code:

<?php

  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) {

    require($code_page_directory . '/' . $value);

  }

  require($template->get_template_dir('html_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/html_header.php');

  require($template->get_template_dir('main_template_vars.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/main_template_vars.php');

  $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;

  }

  $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;

  }

  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);

  $zv_onload = str_replace(';;',';',$zv_onload.';');

  if (trim($zv_onload) == ';') $zv_onload='';

  require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page.php');

?>

</html>

<?php

?>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Any suggestions would be greatly appreciated!

This topic has been closed for replies.

2 replies

J Cellini
J CelliniAuthor
Inspiring
March 10, 2010

The path to the PHP bin on the new server was different than the former server. I had to reinstall Zen Cart on the new server (I couldn't just transfer the files).

Inspiring
March 11, 2010

If you look at the settings in the database you should be able to edit the path in the configuration table if it is not written in the configuration page.

Thats how I have done it in the past with Oscommerce