Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header and Footer missing


bpmcclure

Recommended Posts

I have deployed two nearly identical sites, the second being different functionally in that is uses a shared ssl. The first works great, but the second has an issue where the header and footer are missing. Here is the page source info for the header html on the index page. I can see that the image code is missing in the fourth line, but I have no idea where to start looking for the error. Footer page source is similar, with image tag also missing.

 

Any help? Thanks, Bruce

 

<!-- header //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle"><a href="http://mctutor.com/os/index.php"></a></td>'>http://mctutor.com/os/index.php"></a></td>

<!--

<td align="right" valign="bottom"><a href="https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541"><img'>https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541"><img src="images/header_account.gif" border="0" alt="" width="30" height="30"></a>  <a href="http://mctutor.com/os/shopping_cart.php"><img'>http://mctutor.com/os/shopping_cart.php"><img src="images/header_cart.gif" border="0" alt="Cart Contents" title=" Cart Contents " width="30" height="30"></a>  <a href="https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541"><img'>https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541"><img src="images/header_checkout.gif" border="0" alt="Checkout" title=" Checkout " width="30" height="30"></a>  </td>

-->

 

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td class="headerNavigation">  <a href="http://mctutor.com" class="headerNavigation">McTutor Home</a> » <a href="http://mctutor.com/os/index.php" class="headerNavigation">McTutor Store</a></td>

<td align="right" class="headerNavigation">

<a href="https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541" class="headerNavigation"></a>

 | 

 

<a href="http://mctutor.com/os/shopping_cart.php" class="headerNavigation">Cart Contents</a>

 | 

<a href="https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541" class="headerNavigation">Checkout</a>

  </td>

</tr>

</table>

<!-- header_eof //-->

Link to comment
Share on other sites

I have deployed two nearly identical sites, the second being different functionally in that is uses a shared ssl. The first works great, but the second has an issue where the header and footer are missing. Here is the page source info for the header html on the index page. I can see that the image code is missing in the fourth line, but I have no idea where to start looking for the error. Footer page source is similar, with image tag also missing.

 

Any help? Thanks, Bruce

 

<!-- header //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr class="header">

<td valign="middle"><a href="http://mctutor.com/os/index.php"></a></td>'>http://mctutor.com/os/index.php"></a></td>

<!--

<td align="right" valign="bottom"><a href="https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541"><img'>https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541"><img src="images/header_account.gif" border="0" alt="" width="30" height="30"></a>  <a href="http://mctutor.com/os/shopping_cart.php"><img'>http://mctutor.com/os/shopping_cart.php"><img src="images/header_cart.gif" border="0" alt="Cart Contents" title=" Cart Contents " width="30" height="30"></a>  <a href="https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541"><img'>https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541"><img src="images/header_checkout.gif" border="0" alt="Checkout" title=" Checkout " width="30" height="30"></a>  </td>

-->

 

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td class="headerNavigation">  <a href="http://mctutor.com" class="headerNavigation">McTutor Home</a> » <a href="http://mctutor.com/os/index.php" class="headerNavigation">McTutor Store</a></td>

<td align="right" class="headerNavigation">

<a href="https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541" class="headerNavigation"></a>

 | 

 

<a href="http://mctutor.com/os/shopping_cart.php" class="headerNavigation">Cart Contents</a>

 | 

<a href="https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541" class="headerNavigation">Checkout</a>

  </td>

</tr>

</table>

<!-- header_eof //-->

You might want to post the code from your config file (minus the user name and password).

Link to comment
Share on other sites

You might want to post the code from your config file (minus the user name and password).

 

Here it is, and thanks! Hope someone sees something that I am not!!

<?php
 define('HTTP_SERVER', 'http://mctutor.com');
 define('HTTPS_SERVER', 'https://secure51.inmotionhosting.com/~mctuto5');
 define('ENABLE_SSL', true);
 define('HTTP_COOKIE_DOMAIN', 'mctutor.com');
 define('HTTPS_COOKIE_DOMAIN', 'secure51.inmotionhosting.com/~mctuto5');
 define('HTTP_COOKIE_PATH', '/os/');
 define('HTTPS_COOKIE_PATH', '/os/');
 define('DIR_WS_HTTP_CATALOG', '/os/');
 define('DIR_WS_HTTPS_CATALOG', '/os/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 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_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/mctuto5/public_html/os/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', '********');
 define('DB_SERVER_PASSWORD', '*******');
 define('DB_DATABASE', '*******');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

Link to comment
Share on other sites

Are the files actually in your includes directory?

I think Coop was referring the the /includes/header.php and /includes/footer.php files.

 

You'll need to post the code from them to see what's up.

 

It's always better to post PHP in a CODEBOX or between CODE tags if you can. It preserves the original formatting.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Do you mean the image files? They seem to be there. See http://mctutor.com/os/images/

 

Yes the header.php and footer.php files are in /includes.

 

Here is footer.php:

 

<?php
/*
 $Id: footer.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 //require(DIR_WS_INCLUDES . 'counter.php');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="footer">
   <td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
   <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
 </tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
 </tr>
</table>
<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
 </tr>
</table>
<?php
 }
?>

 

And header.php:

 

<?php
/*
 $Id: header.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
   if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
     $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
   }
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
   if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
     $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
   }
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
   if (STORE_SESSIONS == '') {
     if (!is_dir(tep_session_save_path())) {
       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
     } elseif (!is_writeable(tep_session_save_path())) {
       $messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
     }
   }
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
   if (ini_get('session.auto_start') == '1') {
     $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
   }
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
   if (!is_dir(DIR_FS_DOWNLOAD)) {
     $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
   }
 }

 if ($messageStack->size('header') > 0) {
   echo $messageStack->output('header');
 }
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'Logo.png', STORE_NAME) . '</a>'; ?></td>
<!--
<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
-->
 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
<?php // Guest account start ?>
<?php if ($guest_account == false) { // Not a Guest Account ?>
       <td align="right" class="headerNavigation">
       <?php if (tep_session_is_registered('customer_id')) { ?>
         <a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>
          | 
       <?php } ?>
       <a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
        | 
       <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
        | 
       <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>
         </td>
<?php } else { // Its a guest account ?>
       <td align="right" class="headerNavigation">
       <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>
        | 
       <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>
         </td>
<?php } // Guest account end ?>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
   <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
   <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
 </tr>
</table>
<?php
 }
?>

Link to comment
Share on other sites

It looks like you might have a stray <!-- in your header code. I'd use Beyond Compare to compare your header file to a stock install header file.

Link to comment
Share on other sites

It looks like you might have a stray <!-- in your header code. I'd use Beyond Compare to compare your header file to a stock install header file.

 

Thanks, I tried this and no joy. I can see what is happening, just can't figure out why.

 

Here is the page source of my site that works, third line below <!-- header //-->

 

<td valign="middle"><a href="http://kardkase.com/os/index.php?osCsid=d9b898759be8931f1fbfa3fd4346d33e"><img src="images/Logo.png" border="0" alt="KardKase" title=" KardKase " width="500" height="90"></a></td>

 

And here is the same line in the page source of the site that is not loading the header and footer

 

<td valign="middle"><a href="http://mctutor.com/os/index.php"></a></td>

 

Note that the sid is missing, as well as everything that follows it, which is where the header logo, etc, is.

 

Anyone got any ideas where this would be happening? The one difference between the sites is that the broken one uses a shared ssl. If works fine in the development env.

Link to comment
Share on other sites

Any help on this one? Where does the call come to load the session ID on the index page? I see the ID a few lines down from where it is missing in the line that loads the account and shopping cart breadcrumbs: it uses the ssl. This is why I think it may be associated with the shared ssl somehow, but I am too inexperienced to be sure of anything.

Link to comment
Share on other sites

Bump. Still looking for where to start looking to see why my header and footer do not show up.

 

Can anyone take a look at this thread and give me a hint where to start looking? Thanks.

Link to comment
Share on other sites

Here's what I am seeing. The page source for the dev site and my two production sites is below. The line where the logo seems to load is the fourth one, and it looks different in each site. I am tearing my hair out trying to figure out what is going on here.

 

The development site, which runs fine, has page source of the header that looks like this:

 

<!-- header //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><a href="http://localhost/catalog/index.php?osCsid=9d028aedfb7231503ac8a1f7653dce53"><img src="images/Logo.png" border="0" alt="McTutor" title=" McTutor " width="340" height="85"></a></td>
<!--
<td align="right" valign="bottom"><a href="http://localhost/catalog/account.php?osCsid=9d028aedfb7231503ac8a1f7653dce53"><img src="images/header_account.gif" border="0" alt="" width="30" height="30"></a>  <a href="http://localhost/catalog/shopping_cart.php?osCsid=9d028aedfb7231503ac8a1f7653dce53"><img src="images/header_cart.gif" border="0" alt="Cart Contents" title=" Cart Contents " width="30" height="30"></a>  <a href="http://localhost/catalog/checkout_shipping.php?osCsid=9d028aedfb7231503ac8a1f7653dce53"><img src="images/header_checkout.gif" border="0" alt="Checkout" title=" Checkout " width="30" height="30"></a>  </td>
-->

 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <a href="http://localhost" class="headerNavigation">McTutor Home</a> » <a href="http://localhost/catalog/index.php?osCsid=9d028aedfb7231503ac8a1f7653dce53" class="headerNavigation">McTutor Store</a></td>
       <td align="right" class="headerNavigation">
               <a href="http://localhost/catalog/account.php?osCsid=9d028aedfb7231503ac8a1f7653dce53" class="headerNavigation"></a>
        | 

       <a href="http://localhost/catalog/shopping_cart.php?osCsid=9d028aedfb7231503ac8a1f7653dce53" class="headerNavigation">Cart Contents</a>
        | 
       <a href="http://localhost/catalog/checkout_shipping.php?osCsid=9d028aedfb7231503ac8a1f7653dce53" class="headerNavigation">Checkout</a>
         </td>
 </tr>
</table>
<!-- header_eof //-->

 

Here's the page source of the production site that does work properly; it has a dedicated SSL.

 

<!-- header //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><a href="http://kardkase.com/os/index.php"><img src="images/Logo.png" border="0" alt="KardKase" title=" KardKase " width="500" height="90"></a></td>
<!--
<td align="right" valign="bottom"><a href="https://www.kardkase.com/os/account.php?osCsid=63cb32bf1d5561514a90303ddd7e338f"><img src="images/header_account.gif" border="0" alt="" width="30" height="30"></a>  <a href="http://kardkase.com/os/shopping_cart.php"><img src="images/header_cart.gif" border="0" alt="Cart Contents" title=" Cart Contents " width="30" height="30"></a>  <a href="https://www.kardkase.com/os/checkout_shipping.php?osCsid=63cb32bf1d5561514a90303ddd7e338f"><img src="images/header_checkout.gif" border="0" alt="Checkout" title=" Checkout " width="30" height="30"></a>  </td>
-->

 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <a href="http://kardkase.com" class="headerNavigation">KardKase Home</a> » <a href="http://kardkase.com/os/index.php" class="headerNavigation">KardKase Store</a></td>
       <td align="right" class="headerNavigation">
               <a href="https://www.kardkase.com/os/account.php?osCsid=63cb32bf1d5561514a90303ddd7e338f" class="headerNavigation"></a>
        | 

       <a href="http://kardkase.com/os/shopping_cart.php" class="headerNavigation">Cart Contents</a>
        | 
       <a href="https://www.kardkase.com/os/checkout_shipping.php?osCsid=63cb32bf1d5561514a90303ddd7e338f" class="headerNavigation">Checkout</a>
         </td>
 </tr>
</table>
<!-- header_eof //-->

 

And here's the page source for the site that does not work; it uses a shared SSL and should match the first one above.

 

<!-- header //--> 
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
   <td valign="middle"><a href="http://mctutor.com/os/index.php"></a></td>
<!--
<td align="right" valign="bottom"><a href="https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541"><img src="images/header_account.gif" border="0" alt="" width="30" height="30"></a>  <a href="http://mctutor.com/os/shopping_cart.php"><img src="images/header_cart.gif" border="0" alt="Cart Contents" title=" Cart Contents " width="30" height="30"></a>  <a href="https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541"><img src="images/header_checkout.gif" border="0" alt="Checkout" title=" Checkout " width="30" height="30"></a>  </td>
-->

 </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
   <td class="headerNavigation">  <a href="http://mctutor.com" class="headerNavigation">McTutor Home</a> » <a href="http://mctutor.com/os/index.php" class="headerNavigation">McTutor Store</a></td>
       <td align="right" class="headerNavigation">
               <a href="https://secure51.inmotionhosting.com/~mctuto5/os/account.php?osCsid=becac91ea611b83068a14f55a3225541" class="headerNavigation"></a>
        | 

       <a href="http://mctutor.com/os/shopping_cart.php" class="headerNavigation">Cart Contents</a>
        | 
       <a href="https://secure51.inmotionhosting.com/~mctuto5/os/checkout_shipping.php?osCsid=becac91ea611b83068a14f55a3225541" class="headerNavigation">Checkout</a>
         </td>
 </tr>
</table>
<!-- header_eof //-->

Link to comment
Share on other sites

I tried using a shared SSL on the site that does work properly to see if I got the same indications (no header or footer), and it worked just fine. So that shared SSL difference is NOT the problem.

 

My next project will be to delete the live files and try redeploying the problem site. We'll see if that yields any insight.

Link to comment
Share on other sites

Did the redeployment, and had no luck.

 

Then I replaced the non-working site with the working one. It loaded properly, so I began editing, and discovered that the file name of the logo I was using in the header did not match EXACTLY the name in the header.php file. Something as simple as Logo.png vs. logo.PNG. Once I figured that out, all was well.

 

The problem with the footer I never did learn, but I suspect the .hpaccess file, which was different between the two carts.

 

Anyway, all is well now, after a bit of brute force troubleshooting!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...