Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Installing on a Linux/Unix Server / Help reinstalling store

Help reinstalling store

Started by boatersplanet on 14 Jun 2011, 7:20 PM · Views: 6,284

Results 21 to 39 of 39
17 Jun 2011, 11:03 PM
#21
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Help reinstalling store

I don't know how the two would differ, but I will include my tpl_main_page.php for my template.

<?php
/*
  $Id: tpl_main_page.php, template: OS03C00282 v2.00  08/01/09  14:20:41 hpdl Exp $

  This file created as a part of graphical design by AlgoZone, Inc
  http://www.algozone.com for ZenCart 1.3
  
  Copyright (c) 2002-2009 AlgoZone, Inc

*/

// the following IF statement can be duplicated/modified as needed to set additional flags
  if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
    $flag_disable_right = true;
  }

  $header_template = 'tpl_header.php';
  $footer_template = 'tpl_footer.php';
  $left_column_file = 'column_left.php';
  $right_column_file = 'column_right.php';
  $body_id = str_replace('_', '', $_GET['main_page']);
?>
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
<?php 

//#PR Define template image directory. Can be used to store template images in different location
define('DIR_WS_TEMPLATE_IMAGES', $template->get_template_dir('.',DIR_WS_TEMPLATE, $current_page_base,'images'));
//#PR Redefine DIR_WS_BOXES for BTS new path to template boxes
define('DIR_WS_BOXES_AZ', DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/');
?>
<!-- header //-->


<script type='text/javascript' src='js/x_core.js'></script>
<script type='text/javascript' src='js/x_dom.js'></script>
<script type='text/javascript' src='js/x_event.js'></script>
<script type='text/javascript' src='js/az_animebox.js'></script>

<?php require(DIR_WS_INCLUDES . '/browser_agent.php'); ?>
<?php require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/menu.php'); ?>

<?php 
	$css_buttons_fix = ($agent['browser'] != 'msie') ? 'style="padding-top: 2px; padding-bottom: 4px;"' : '' ;
	$browser_type = $agent['browser'];
	function az_tep_image($image, $alt = '', $parameters = '') {
		global $css_buttons_fix, $browser_type;
		if($browser_type ==  'msie'){
			$button_html = '<div class="az_button_img" '. $css_buttons_fix .'>';
			$button_html .= '<img src="'. DIR_WS_TEMPLATE_IMAGES . 'az_button_left.gif" border="0" alt="" align="absmiddle" />';
			$button_html .= '  '.$alt.'  ';
			$button_html .= '<img src="'. DIR_WS_TEMPLATE_IMAGES . 'az_button_right.gif" border="0" alt="" align="absmiddle" />';
			$button_html .= '</div>';
		}
		else {
			$button_html = '<table border="0" cellspacing="0" cellpadding="0"><tr>';
			$button_html .= '<td><img src="'. DIR_WS_TEMPLATE_IMAGES . 'az_button_left.gif" border="0" alt="" align="absmiddle" /></td>';
			$button_html .= '<td class="az_button_submit" style="vertical-align:middle">  '.$alt.'  </td>';
			$button_html .= '<td><img src="'. DIR_WS_TEMPLATE_IMAGES . 'az_button_right.gif" border="0" alt="" align="absmiddle" /></td>';
			$button_html .= '</tr></table>';
		}
		return $button_html;
	}
	function az_tep_image_submit($image, $alt = '', $parameters = '') {
		global $css_buttons_fix;
		$button_html = '<img border="0" src="'. DIR_WS_TEMPLATE_IMAGES . 'az_button_left.gif" alt="" />';
		$button_html .= '<input class="az_button_submit" '. $css_buttons_fix .' type="submit" class="noborder"  value="'.$alt.'" ' . $parameters. ' />';
		$button_html .= '<img border="0" src="'. DIR_WS_TEMPLATE_IMAGES . 'az_button_right.gif" alt="" />';
		return $button_html;
	}
?>
<!-- animBoxes -->
<script type="text/javascript">
xAddEventListener(window, 'load', function() { newbox = new animBox('animBoxCart', 1, 2, 1, <?php echo ($_SESSION['cart']->count_contents() > 0) ? (sizeof($_SESSION['cart']->get_products()) * 500 - (sizeof($_SESSION['cart']->get_products()) - 1) * 250) : 250; ?>); xOpacity('animBoxCart', 0.9); newbox.reposition('btn_animBoxCart', '-', '+'); }, false);
</script>

<div id="animBoxCart" class="animBoxDropover jsContainer">
<?php
	if (!defined('CART_IMAGE_WIDTH')) { define('CART_IMAGE_WIDTH', 50); }
	if (!defined('CART_IMAGE_HEIGHT')) { define('CART_IMAGE_HEIGHT', NULL); }

	if ($_SESSION['cart']->count_contents() > 0)
	{
		echo '<table width="100%" cellspacing="0" cellpadding="5">';
		echo '  <tr><td class="animBoxCartLink" colspan="2"><a href="'. zen_href_link(FILENAME_SHOPPING_CART) .'">'. TEXT_CART_LINK .'</a></td></tr>';
		$products = $_SESSION['cart']->get_products();
		for ($i=0, $n=sizeof($products); $i<$n; $i++)
		{
			$products_name = '  <tr>' .
											 '    <td class="animBoxCartImage" width="'. CART_IMAGE_WIDTH .'" align="center"><a href="'. zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) .'">'. zen_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], CART_IMAGE_WIDTH, CART_IMAGE_HEIGHT) .'</a></td>' .
											 '    <td class="animBoxCartContent">' .
											 '      <div class="animBoxCartName"><a href="'. zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) .'">'. $products[$i]['name'] .'</a></div>';
											 '      '. TEXT_CART_QUANTITY .' '. $products[$i]['quantity'] .
											 '      <div class="animBoxCartPrice">'. $currencies->display_price($products[$i]['final_price'], zen_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) .'</a></div>' .
											 '      <a href="'. zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) .'">'. TEXT_CART_MORE_INFO .'</a>' .
											 '    </td>' .
											 '  </tr>';
			echo $products_name;
		}
		echo '  <tr><td class="animBoxCartTotal" colspan="2">'. TEXT_CART_SUBTOTAL .' '. $currencies->format($_SESSION['cart']->show_total()) .'</td></tr>';
		echo '</table>';
	}
	
	else // ($cart->count_contents() > 0)
	{
		echo '<div class="animBoxCartNotice">'. TEXT_CART_EMPTY .'</div>';
	}
?>
</div>
<!-- animBoxes_eof -->

<!-- body -->
<table class="header_tb" width="980" cellpadding="0" cellspacing="0" align="center">
	<tr>
		<td width="331"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_header_top.gif" class="noborder" alt="<?php echo MENU_TEXT_HOME; ?>" /></a></td>
		<td>
			<table class="header_boxes_tb" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td width="160" align="center">
						<a href="http://www.boatersplanet.com/blog"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_arrow_1.gif" class="noborder" alt="" /><p style="text-align: center;"><span style="color: #ffff00;"><span style="font-size: small;"><span style="font-family: georgia,palatino;">CHECK OUT OUR BLOG!</span></p></a>
					</td>
					<td width="3"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_header_boxes_sep.gif" class="noborder" alt="" /></td>
					<td width="150">
						<table cellspacing="0" cellpadding="0" align="center">
							<?php $column_location = 'Header'; ?>
							<?php include(DIR_WS_BOXES_AZ . 'languages_az01.php'); ?>
							<?php $column_location = ''; ?>
						</table>
					</td>
					<td width="3"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_header_boxes_sep.gif" class="noborder" alt="" /></td>
					<td width="160">
						<table cellspacing="0" cellpadding="0" align="center">
							<?php $column_location = 'Header'; ?>
							<?php include(DIR_WS_BOXES_AZ . 'currencies_az01.php'); ?>
							<?php $column_location = ''; ?>
						</table>								
					</td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" align="center">
				<tr>
					<td>
						<table width="100%" class="menubarmain_tb" cellspacing="0" cellpadding="0">
							<tr>
								<td class="menubarmain" width="129" onmouseover="className='menubarmain over'" onmouseout="className='menubarmain'"><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_menu_home.gif" class="noborder alignMiddle" alt="<?php echo MENU_TEXT_HOME; ?>" /></a></td>
								<td width="1"></td>
								<td class="menubarmain" width="129" onmouseover="className='menubarmain over'" onmouseout="className='menubarmain'"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_menu_cart.gif" class="noborder alignMiddle" alt="<?php echo MENU_TEXT_CART; ?>" /></a></td>
								<td width="1"></td>
								<td class="menubarmain" width="129" onmouseover="className='menubarmain over'" onmouseout="className='menubarmain'"><a class="az_menu_button" href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_menu_members.gif" class="noborder alignMiddle" alt="<?php echo MENU_TEXT_MEMBERS; ?>" /></a></td>
								<td width="1"></td>
								<td class="menubarmain" width="129" onmouseover="className='menubarmain over'" onmouseout="className='menubarmain'"><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_menu_checkout.gif" class="noborder alignMiddle" alt="<?php echo MENU_TEXT_CHECKOUT; ?>" /></a></td>
								<td width="1"></td>
								<td class="menubarmain" width="129" onmouseover="className='menubarmain over'" onmouseout="className='menubarmain'"><a href="<?php echo zen_href_link(FILENAME_CONTACT_US);?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_menu_contact.gif" class="noborder alignMiddle" alt="<?php echo MENU_TEXT_CONTACTUS; ?>" /></a></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>	
<table class="header_tb" width="980" cellpadding="0" cellspacing="0" align="center">	
	<tr>
		<td><a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_header.jpg" class="noborder" alt="" /></a></td>
	</tr>
</table>
<table width="980" cellpadding="0" cellspacing="0" align="center">	
	<tr>
		<td width="714">
			<table cellspacing="0" cellpadding="0" align="center" class="az_info_bar">
				<?php $column_location = 'Header'; ?>
				<?php include(DIR_WS_BOXES_AZ . 'information_az01.php'); ?>
				<?php $column_location = ''; ?>
			</table>
		</td>
		<td class="az_info_bar_cart">
			<div id="btn_animBoxCart" class="jsTrigger">
			<table cellspacing="0" cellpadding="0" align="center">
				<?php $column_location = 'Header'; ?>
				<?php include(DIR_WS_BOXES_AZ . 'shopping_cart_az01.php'); ?>
				<?php $column_location = ''; ?>
			</table>
			</div>
		</td>
		<td width="58"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_cart_box_right.gif" class="noborder" alt="" /></td>				
	</tr>
</table>
<table class="maincont_tb" width="980" cellpadding="0" cellspacing="0" align="center">
	<tr>
		<td>
<!-- header_eof //-->
<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="maincont_tb">
  <tr>
<?php
if (COLUMN_LEFT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) {
  // global disable of column_left
  $flag_disable_left = true;
}
if (!isset($flag_disable_left) || !$flag_disable_left) {
?>
    <td width="<?php echo BOX_WIDTH_LEFT; ?>" valign="top" class="maincont_left_td">
    <table border="0" width="<?php echo COLUMN_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0" class="leftbar_tb">


<!-- left_navigation //-->
<?php require(DIR_WS_MODULES . zen_get_module_directory('column_left.php')); ?>
<!-- left_navigation_eof //-->


    </table></td>
<?php
 }
?>
<!-- content //-->
    <td width="100%" valign="top" class="maincont_mid_td">
<?php
	if ( file_exists($template->get_template_dir('sub_header.php',DIR_WS_TEMPLATE, $current_page_base,'common') . '/sub_header.php') ) {
		require($template->get_template_dir('sub_header.php',DIR_WS_TEMPLATE, $current_page_base,'common') . '/sub_header.php');
	}

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

<?php require($body_code); ?>

<?php
	if ( file_exists($template->get_template_dir('.',DIR_WS_TEMPLATE, $current_page_base,'common') . '/sub_footer.php') ) {
		require($template->get_template_dir('.',DIR_WS_TEMPLATE, $current_page_base,'common') . '/sub_footer.php');
	}
?>
    </td>
<!-- content_eof //-->
<?php
if (COLUMN_RIGHT_STATUS == 0 or (CUSTOMERS_APPROVAL == '1' and $_SESSION['customer_id'] == '')) {
  // global disable of column_right
  $flag_disable_right = true;
}
if (!isset($flag_disable_right) || !$flag_disable_right) {
?>
	<td valign="top" class="maincont_right_td">
	<table border="0" width="<?php echo COLUMN_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0" class="rightbar_tb">
<!-- right_navigation //-->


<?php require(DIR_WS_MODULES . zen_get_module_directory('column_right.php')); ?>


<!-- right_navigation_eof //-->
    </table></td>
<?php
}
?>
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->


		</td>
	</tr>
</table>
<table class="footer_tb" width="980" cellpadding="0" cellspacing="0" align="center">
	<tr>
		<td width="3"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_footer_left.gif" class="noborder" /></td>			
		<td width="197" align="center"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_cc_icons.gif" class="noborder" /></td>
		<td class="footer_menu_tb" align="center">
			<a href="<?php echo zen_href_link(FILENAME_DEFAULT); ?>"><?php echo MENU_TEXT_HOME; ?></a>   |   
			<a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'SSL'); ?>"><?php echo MENU_TEXT_CART; ?></a>   |   
			<a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo MENU_TEXT_MEMBERS; ?></a>   |   
			<a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo MENU_TEXT_CHECKOUT; ?></a>   |   
			<a href="<?php echo zen_href_link(FILENAME_CONTACT_US);?>"><?php echo MENU_TEXT_CONTACTUS; ?></a>
		</td>
		<td width="247" align="center"><?php echo FOOTER_TEXT_BODY; ?></td>
		<td width="5"><img src="<?php echo DIR_WS_TEMPLATE_IMAGES; ?>az_footer_right.gif" class="noborder" /></td>		
	</tr>
</table>

<?php
 /**
  * prepares and displays footer output
  *
  */
  require($template->get_template_dir('tpl_footer.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_footer.php');?>
<!--bof- parse time display -->
<?php
  if (DISPLAY_PAGE_PARSE_TIME == 'true') {
?>
<div class="smallText center">Parse Time: <?php echo $parse_time; ?> - Number of Queries: <?php echo $db->queryCount(); ?> - Query Time: <?php echo $db->queryTime(); ?></div>
<?php
  }
?>
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<?php
  if (SHOW_BANNERS_GROUP_SET6 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET6)) {
    if ($banner->RecordCount() > 0) {
?>
<?php
    }
  }

</script>
?>
<!--eof- banner #6 display -->
</body>
<!-- footer_eof //-->
18 Jun 2011, 3:01 AM
#22
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help reinstalling store

Boatersplanet,

Just reload a fresh copy of all the files versus chasing this

Zen-Venom Get Bitten

18 Jun 2011, 3:41 AM
#23
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

Kobra,

I appreciate your contribution to the forums as I see how much you do. My problem isn't necessarily the fresh install. I posted this topic about 45 min after the install. I have since downloaded a backup and scanned with NOD32 and Malwarebytes and have come up with nothing. I have gone over the main config files and still can't see a significant difference.

I have (what I believe) a clean database, I have uninstalled all add-ons, and I have two seperate instances of a "clean" install.

The problem seems to be with switching templates. I can have a functional website on the "contemporary green" default template, but when switching to my template, I encounter these errors.

As I stated earlier, I wouldnt worry about paying $20 for the 1.3.9 version of my template, but between running my site on the 1.3.8 template for months, and suggestions that my site is hacked, I have obvious reservations about how to proceed.

18 Jun 2011, 11:55 AM
#24
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Help reinstalling store

It's quite simple really - if the bought-in template you are using was made for 1.3.8+ and you are now running 1.3.9+ and you only get this problem when you switch to the 1.3.8+ template - then get a new template which will work with 1.3.9+

Vger

18 Jun 2011, 2:14 PM
#25
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

Vger:

It's quite simple really - if the bought-in template you are using was made for 1.3.8+ and you are now running 1.3.9+ and you only get this problem when you switch to the 1.3.8+ template - then get a new template which will work with 1.3.9+

Vger

Unfortunately if it were that simple I feel as though I would have run into these issues months ago when upgrading to 1.3.9. I am going to get the template and try anyway.

18 Jun 2011, 2:58 PM
#26
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Help reinstalling store

It wasn't until the 2nd page and post #13 that you made a small reference to this being a new issue and that you had been using 1.3.9+ without problems before that. It was easy enough to overlook that minor reference.

You have not responded to the comments about the file browser_agent.php, which is either a hack file or part of the template you bought in - but you could answer that just by looking through the template files.

As for the template itself there is obviously a problem, because it fails at the point where the header should be loaded. The generated code for your 'test' homepage is below:

<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head> <title>Zen Cart!, The Art of E-commerce</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="keywords" content="Anchor, Docking & Mooring Plumbing Safety Sailboat Seating & Covers Trailer & Parts Ventilation Watersports Boats & Motors Cabin & Galley Cabinet & Deck Hardware Casual Apparel Electrical Electronics Engine Systems Fasteners Fishing Tools, Paint & Maintenance Boaters Planet Gear Cleaners, Polishes & Waxes Winterizing & Storage Lighting Barbecues Binoculars & Night Vision Coolers All Product Catalog's Sierra Parts Mounts Marina Products Books & Videos ARCO Starters & Alternators Zinc's & Anodes General Accessories Lubricants & Additives Towers & Center Consoles Propellers Pocket Tools & Knives Stickers & Decals Compasses & Navigation Tools ecommerce, open source, shop, online shopping "> <meta name="description" content="Zen Cart! : - Anchor, Docking & Mooring Plumbing Safety Sailboat Seating & Covers Trailer & Parts Ventilation Watersports Boats & Motors Cabin & Galley Cabinet & Deck Hardware Casual Apparel Electrical Electronics Engine Systems Fasteners Fishing Tools, Paint & Maintenance Boaters Planet Gear Cleaners, Polishes & Waxes Winterizing & Storage Lighting Barbecues Binoculars & Night Vision Coolers All Product Catalog's Sierra Parts Mounts Marina Products Books & Videos ARCO Starters & Alternators Zinc's & Anodes General Accessories Lubricants & Additives Towers & Center Consoles Propellers Pocket Tools & Knives Stickers & Decals Compasses & Navigation Tools ecommerce, open source, shop, online shopping"> <meta http-equiv="imagetoolbar" content="no"> <meta name="authors" content="The Zen Cart™ Team and others"> <meta name="generator" content="Template by <http://www.template-faq.com> for Zencart shopping cart program"> <base href="http://boatersplanet.com/test/"> <link rel="stylesheet" type="text/css" href="includes/templates/ZC03C00282//stylesheet.css"><link rel="stylesheet" type="text/css" href="includes/templates/ZC03C00282/css/stylesheet_autocomplete.css"> <link rel="stylesheet" type="text/css" href="includes/templates/ZC03C00282/css/stylesheet_css_buttons.css"> <link rel="stylesheet" type="text/css" href="includes/templates/ZC03C00282/css/stylesheet_new.css"> <link rel="stylesheet" type="text/css" href="includes/templates/ZC03C00282/css/stylesheet_zen_lightbox.css"> <link rel="stylesheet" type="text/css" media="print" href="includes/templates/ZC03C00282/css/print_stylesheet.css"> <script type="text/javascript" src="includes/templates/ZC03C00282/jscript/jscript_jquery.js"></script> <script type="text/javascript" src="includes/templates/ZC03C00282/jscript/jscript_jquery_autocomplete.js"></script> <script type="text/javascript" src="includes/templates/ZC03C00282/jscript/jscript_search.js"></script> </head><body id="indexBody"> <!-- header //--> </body></html>

Vger

18 Jun 2011, 3:26 PM
#27
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

Vger:

It wasn't until the 2nd page and post #13 that you made a small reference to this being a new issue and that you had been using 1.3.9+ without problems before that. It was easy enough to overlook that minor reference.

You have not responded to the comments about the file browser_agent.php, which is either a hack file or part of the template you bought in - but you could answer that just by looking through the template files.

As for the template itself there is obviously a problem, because it fails at the point where the header should be loaded. The generated code for your 'test' homepage is below:

Vger

Unfortunately I'm not sure how to accurately answer the browser_agent.php question. It seems harmless enough (as some add on to provide browser compatibility.) I will post the contents of the aforementioned file below:

<?php
$agent['http'] = isset($_SERVER["HTTP_USER_AGENT"]) ? strtolower($_SERVER["HTTP_USER_AGENT"]) : "";
$agent['version'] = 'unknown';
$agent['browser'] = 'unknown';
$agent['b_version'] = 0;
$agent['platform'] = 'unknown';

$oss = array('win', 'mac', 'linux', 'unix');
foreach ($oss as $os) {
	if (strstr($agent['http'], $os)) {
		$agent['platform'] = $os;
		break;
	}
}
	
$browsers = "mozilla msie gecko firefox ";
$browsers.= "konqueror safari netscape navigator ";
$browsers.= "opera mosaic lynx amaya omniweb";

$browsers = split(" ", $browsers);

$nua = strToLower( $_SERVER['HTTP_USER_AGENT']);

$l = strlen($nua);
for ($i=0; $i<count($browsers); $i++){
  $browser = $browsers[$i];
  $n = stristr($nua, $browser);
  if(strlen($n)>0){
   $agent["b_version"] = "";
   $agent["browser"] = $browser;
   $j=strpos($nua, $agent["browser"])+$n+strlen($agent["browser"])+1;
   for (; $j<=$l; $j++){
     $s = substr ($nua, $j, 1);
     if(is_numeric($agent["b_version"].$s) )
     $agent["b_version"] .= $s;
     else
     break;
   }
  }
}

I definitely agree with you that the header is not loading properly and I was worried that it was something I was doing in the transfer of the template files that may have corrupted the stylesheet or one of the other core template files. I don't understand why the classic green template works fine, and my template does not. It can't be the version discrepancy because I feel as though I would have seen it before. I have scanned my files for malware/viruses and came up with nothing. I am waiting for a response back from algozone to get a new copy of the template as I have already purchased it. I'm hoping for the $20 they let me download the latest 1.3.9 version... :unsure:

18 Jun 2011, 3:43 PM
#28
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Help reinstalling store

I see nothing wrong with that file. Is it possible though that your host has upgraded to a new version of PHP recently? That could cause problems with the template but not with the Classic template. It would also account for why it worked for a time and then stopped working.

You should also check the template for the use of PHP Short Tags in place of Full Tags, as a simple change to php.ini would outlaw short tags:

<?= (short tag) <?php echo (full tag) I've seen short tags used far too often in templates. Vger
18 Jun 2011, 4:46 PM
#29
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

Vger:

I see nothing wrong with that file. Is it possible though that your host has upgraded to a new version of PHP recently? That could cause problems with the template but not with the Classic template. It would also account for why it worked for a time and then stopped working.

You should also check the template for the use of PHP Short Tags in place of Full Tags, as a simple change to php.ini would outlaw short tags:

<?= (short tag) <?php echo (full tag) I've seen short tags used far too often in templates. Vger

Vger- I appreciate your continued help. It is worth mentioning that although i believe i have been running on the latest php platform (5.x) I have migrated to a new hosting company and then migrated again from a shared platform to vps. I have exhausted efforts with the hosting company to isolate an issue on the serverside which is why i have been combing through the installation. I have made redundant backups of the database, cleaned it up a bit, and I am playing with two testing directories to resolve the issue.

I appreciate your suggestion with the php.ini file and i will try editing any instance of short tags and try again as I wait for the template. I am open to anyone elses suggestions on what to look for in either the zencart installation or the template directory. Again, I appreciate everyones continued efforts in trying to resolve this issue.

18 Jun 2011, 4:51 PM
#30
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help reinstalling store

i believe i have been running on the latest php platform (5.x) I have migrated to a new hosting company and then migrated again from a shared platform to vps
Are both the main store and the /test store operating on the same server?
Same server php version etc??
Are they using the same template?
And so on

Zen-Venom Get Bitten

18 Jun 2011, 5:06 PM
#31
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Help reinstalling store

Using PS Pad --> Search --> Search/Replace In Files --> Text to Find = <? and tick the box which says "Whole words only", and then seach inside the folder containing the local copy of your template files.

This will show only the short tags used and not all opening php tags.

Vger

18 Jun 2011, 5:14 PM
#32
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

kobra:

Are both the main store and the /test store operating on the same server?
Same server php version etc??
Are they using the same template?
And so on

  1. I have the existing store with a cluttered directory (add-ons) etc. The public facing site functions fine but I can no longer access the admin. It pulls up with a blank page and generates no error in zencarts cache or server side. I then decided to do a clean install using the existing database and migrating the existing template. As a result i created the following to test/build out until it functions correctly, and then i would replace the old install in the home directory with the working one.

I have an installation in /demo which is a fresh install but using the same database so I can continue to process orders.

I have a clean installation in /test with a replicated database.

All three installations are on the same server with the same php version etc. The reason why I was concerned is because i tried to install an add-on module to create customers/orders to process phone orders for my business partner. When
i encountered the error i restored a backup of the entire home directory from the previous day and i still had the same error. My hosting company suggested that perhaps the configuration.php may have been broken etc. And that i may want to just do a clean installation. In a last attempt i restored a full backup that i originally migrated over to the hosting company with. In theory it should function after that because it worked fine when i migrated over. Alas, no luck... so that is how i got to the point where i am at now. I am concerned that perhaps there may be something in the configuration of the vps that does not provide a suitable environment for zencart (i.e php conflict or some weird htaccess). I am going to try to edit the short tags as suggested but beyond that im lost. I am concerned that there is somethin right in front of me in the vps configuration that isnt correct and my hosting company just doesn't know to change it.:unsure:

18 Jun 2011, 5:20 PM
#33
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help reinstalling store

Thank you for the clarification

That is a precarious situation...

Any particular reason you moved to a VPS where you have taken on the additional responsibility of being the server admin?

Zen-Venom Get Bitten

18 Jun 2011, 5:48 PM
#34
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

kobra:

Thank you for the clarification

That is a precarious situation...

Any particular reason you moved to a VPS where you have taken on the additional responsibility of being the server admin?

I had existing concerns with the configuration. I was suspended twice from my first hosting provider for using too many resources but they wouldnt tell me what specifically was the issue. MySQL was just sucking up resources (1500 queries/second) with spiders. Insane.. I know... but i have about 80,000 products. I paid developers to look at the database and they could find nothing in the database with the exception of counters_history table which reached 1.4M entries= ~60MB. I then got suspended by the new hosting company and they suggested that we move to a 256MB VPS (burstable to 1GB) and at $40/month I'm not complaining..

19 Jun 2011, 3:43 PM
#35
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Help reinstalling store

I see two main reasons for using VPS (though there are many other, lesser, reasons):

  1. The site owner wants a guaranteed share of resources and/or immunity from the actions of another site owner on a shared server which may bring the whole server down.

  2. The site itself has outgrown shared hosting because of the demands on resources it makes. This would appear to be your situation. 1500 SQL queries per second is incredible, and definitely shows something wrong with the scripting or settings of your website. Even with 80k products and an active site it shouldn't generate that number of SQL queries (per minute maybe, but not per second). We have a few customers with 120k+ product websites and they don't place a strain on our shared servers - which again points to a problem with the scripting or settings used on your site.

And having said that, given the demands of your site, having a VPS with just 256 Mbs of RAM is a bad joke. 256 Mbs is the bottom rung of the VPS ladder and I would only recommend that for a not-too-active site which fell under the reasons I gave in Para 1.

Okay, I'll shut up about VPS now. Your problem is that your site works up until you try to use a particular template - at which point it stops working. You've said that the same site with the Classic Green template works okay.

I've spent a lot of time chasing down problems like this and point again to the frequent use of PHP Short Tags by developers of templates. I'm as sure as I can be that this is where you'll find the problem.

You can test this out by adding this to a root level .htaccess file:

php_flag short_open_tag on

or

php_value short_open_tag on

Depending on the configuration of the server this will either work and allow the use of short tags, or else it will cause a "500 - Internal Server" error.

Vger

19 Jun 2011, 11:55 PM
#36
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help reinstalling store

Vger:

I see two main reasons for using VPS (though there are many other, lesser, reasons):

  1. The site owner wants a guaranteed share of resources and/or immunity from the actions of another site owner on a shared server which may bring the whole server down.

  2. The site itself has outgrown shared hosting because of the demands on resources it makes. This would appear to be your situation. 1500 SQL queries per second is incredible, and definitely shows something wrong with the scripting or settings of your website. Even with 80k products and an active site it shouldn't generate that number of SQL queries (per minute maybe, but not per second). We have a few customers with 120k+ product websites and they don't place a strain on our shared servers - which again points to a problem with the scripting or settings used on your site.

And having said that, given the demands of your site, having a VPS with just 256 Mbs of RAM is a bad joke. 256 Mbs is the bottom rung of the VPS ladder and I would only recommend that for a not-too-active site which fell under the reasons I gave in Para 1.

Okay, I'll shut up about VPS now. Your problem is that your site works up until you try to use a particular template - at which point it stops working. You've said that the same site with the Classic Green template works okay.

I've spent a lot of time chasing down problems like this and point again to the frequent use of PHP Short Tags by developers of templates. I'm as sure as I can be that this is where you'll find the problem.

You can test this out by adding this to a root level .htaccess file:

php_flag short_open_tag on

> or
> ```
php_value short_open_tag on

Depending on the configuration of the server this will either work and allow the use of short tags, or else it will cause a "500 - Internal Server" error.

Vger

Vger,

I spent some time combing through a local copy of the template directory. I only found 3 instances of a short php tag.... and it was on some gv_coupon page... I edited the .htaccess file as mentioned also, and got a 500 error. Still at a loss over this one... Kobra was kind enough to offer to look over a cpanel backup so I'll wait to hear back on that too.

20 Jun 2011, 9:10 AM
#37
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Help reinstalling store

Vger:

The site itself has outgrown shared hosting because of the demands on resources it makes. This would appear to be your situation. 1500 SQL queries per second is incredible
Where have you been??

We have single products with attributes that generate 5k-6k querries and process these in under 1sec

Zen-Venom Get Bitten

20 Jun 2011, 12:45 PM
#38
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Help reinstalling store

Where have you been??

Commissioning and providing day-to-day handling of some of the biggest and fastest servers in existence today.

We have single products with attributes that generate 5k-6k querries and process these in under 1sec

To generate that number of queries for a single product then you must have an incredibly complicated and deep Products Attributes set-up.

Vger

21 Jun 2011, 5:34 PM
#39
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Help reinstalling store

Vger:

Commissioning and providing day-to-day handling of some of the biggest and fastest servers in existence today.

I'll vouch for that! Our hosting on your new pegasus server makes lightning look positively sluggish! :D

I cannot believe the positive difference that server is having on our clients' websites...

20 years a Zencart User