Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Please Help!Fatal error: Call to a member function on a non-object in /install/templates/main_page/header.php on line 51


dsaini77

Recommended Posts

I am getting error while installing. Please please help!

 

Fatal error: Call to a member function on a non-object in /home/content/d/s/a/dsaini/html/harlil/install/templates/main_page/header.php on line 51

 

Here is header.php

 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++

<?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

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 cellspacing=0 cellpadding=0 width=744 align=center>

<tr><td height=25 colspan=3></td></tr>

<tr><td colspan=3><img src=images/m27.gif width=744 height=3></td></tr>

<tr><td class=bg1 width=3></td>

<td>

 

<table cellspacing=0 cellpadding=0 width=738 align=center bgcolor=#ffffff>

<tr><td>

 

 

<table cellspacing=0 cellpadding=0 width=716 align=center>

<tr><td>

<table cellspacing=0 cellpadding=0>

<tr><td><a href=<?=tep_href_link('index.php')?>><img src=images/m01.gif width=208 height=96 border=0></a></td>

<td width=144></td>

<td width=364>

<table cellspacing=0 cellpadding=0 width=364>

<tr><td height=44></td></tr>

<tr><td align=right><span class=ni><a class=ni href=<?=tep_href_link('shopping_cart.php')?>>Shopping Cart: now in your cart</span></a><span class=ml>  <?=$cart->count_contents()?> items</span></td></tr>

<tr><td height=8></td></tr>

<tr><td align=right><a class=ml1 href=<?=tep_href_link('specials.php')?>>Specials</a>   <font color=#8F8F8F>|</font>   <a class=ml1 href=<?=tep_href_link('advanced_search.php')?>>Search</a>   <font color=#8F8F8F>|</font>   <a class=ml1 href=<?=tep_href_link('contact_us.php')?>>Contact Us</a>   <font color=#8F8F8F>|</font>   <a class=ml1 href=<?=tep_href_link('create_account.php')?>>Create an account</a>   <font color=#8F8F8F>|</font>   <a class=ml1 href=<?=tep_href_link('login.php')?>>Customer Login</a></td></tr>

<tr><td height=22></td></tr>

</table>

</td></tr>

<tr><td colspan=3><img src=images/m02.jpg width=280 border=0 height=161><a href=<?=tep_href_link('specials.php')?>><img src=images/m03.jpg border=0 width=267 height=161><img src=images/m04.gif width=169 border=0 height=161></a></td></tr>

<tr><td colspan=3 height=5></td></tr>

<tr><td colspan=3><a href=<?=tep_href_link('index.php')?>><img src=images/m05.gif width=102 height=37 border=0></a><a href=<?=tep_href_link('products_new.php')?>><img src=images/m06.gif width=166 height=37 border=0></a><a href=<?=tep_href_link('account.php')?>><img src=images/m07.gif width=147 height=37 border=0></a><a href=<?=tep_href_link('shopping_cart.php')?>><img src=images/m08.gif width=166 height=37 border=0></a><a href=<?=tep_href_link('checkout_shipping.php')?>><img src=images/m09.gif width=135 height=37 border=0></a></td></tr>

<tr><td colspan=3 height=2></td></tr>

</table>

<table cellspacing=0 cellpadding=0>

<tr><td width=219 valign=top>

<table cellspacing=0 cellpadding=0>

<tr><td width=132>

<table cellspacing=0 cellpadding=0>

<tr><td height=22></td></tr>

<tr><td class=ni1>Currencies:</td></tr>

<tr><td height=6></td></tr>

<tr><td>

<? // CURRENCIES

 

echo tep_draw_form('currencies', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get');

 

reset($currencies->currencies);

$currencies_array = array();

while (list($key, $value) = each($currencies->currencies)) {

$currencies_array[] = array('id' => $key, 'text' => $value['title']);

}

 

$hidden_get_variables = '';

reset($HTTP_GET_VARS);

while (list($key, $value) = each($HTTP_GET_VARS)) {

if ( ($key != 'currency') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) {

$hidden_get_variables .= tep_draw_hidden_field($key, $value);

}

}

 

echo tep_draw_pull_down_menu('currency', $currencies_array, $currency, 'onChange="this.form.submit(); " style="width:120px; font-size: 9px" ') . $hidden_get_variables . tep_hide_session_id();

echo '</form>';

 

?>

 

</td></tr>

<tr><td height=17></td></tr>

</table>

</td>

<td width=87>

<table cellspacing=0 cellpadding=0>

<tr><td height=12></td></tr>

<tr><td class=ni1>Choose<br>your language:</td></tr>

<tr><td height=2></td></tr>

<tr><td>

<? // LANGUAGES

 

if (!isset($lng) || (isset($lng) && !is_object($lng))) {

include(DIR_WS_CLASSES . 'language.php');

$lng = new language;

}

 

$languages_string = '';

reset($lng->catalog_languages);

while (list($key, $value) = each($lng->catalog_languages)) {

$languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';

}

 

echo $languages_string;

 

?>

 

</td></tr>

<tr><td height=13></td></tr>

</table>

</td></tr>

</table>

<table cellspacing=0 cellpadding=0>

<tr><td><img src=images/m13.gif width=219 height=48></td></tr>

<tr><td width=219 bgcolor=#EEEEEE>

<table cellspacing=0 cellpadding=0 width=191 align=center>

 

 

 

<? // ---- MANUFACTURERS STRING OUTPUT

 

 

$manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name");

if ($number_of_rows = tep_db_num_rows($manufacturers_query)) {

 

$manufacturers_array = array();

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {

$output .= $output ? '<tr><td><img src=images/m14.gif width=191 height=1></td></tr><tr><td height=3></td></tr>' : '';

$output .= '<tr><td>  <img src=images/m15.gif width=3 height=5 align=absmiddle>  <a class=ml2 href=';

$manufacturers_name = ((strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN) ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name']);

$output .= tep_href_link('index.php', 'manufacturers_id='.$manufacturers['manufacturers_id']). '>'.$manufacturers_name;

$output .= '</a></td></tr><tr><td height=3></td></tr>';

}

 

echo $output;

}

 

?>

 

 

 

 

<tr><td height=16></td></tr>

</table>

</td></tr>

</table>

<table cellspacing=0 cellpadding=0>

<tr><td height=12></td></tr>

<tr><td><a href=<?=tep_href_link('product_info.php','products_id=129')?>><img src=images/m16.jpg width=219 height=74 border=0></a></td></tr>

<tr><td height=12></td></tr>

</table>

</td>

<td width=11></td>

<td width=1 bgcolor=#000000></td>

<td width=11></td>

<td width=474 valign=top>

Link to comment
Share on other sites

In osCommerce the only file in the install/templates/main_page/ folder is stylesheet.css - so I don't know what you are installing, only that it isn't osCommerce.

 

Vger

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...