Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

issue with includes/classes/logger.php)


nafri

Recommended Posts

hi

 

i was checking a history of a test order on acount_history_info.php and i got this message.

 

 

Warning: main(includes/classes/logger.php) [function.main]: failed to open stream: No such file or directory in /homepages/17/d189999914/htdocs/admin/includes/application_top.php on line 74

 

Fatal error: main() [function.require]: Failed opening required 'includes/classes/logger.php' (include_path='.:/usr/local/lib/php') in /homepages/17/d189999914/htdocs/admin/includes/application_top.php on line 74

 

i searched the forum and the fixes i found dont seem to work. i have the all the options in logging to false."Store Page Parse Time" to false as well as Store Database Queries to false.

 

Title Value Action

Store Page Parse Time false

Log Destination logger/page_parse_time.log Info

Log Date Format %d/%m/%Y %H:%M:%S Info

Display The Page Parse Time false Info

Store Database Queries false

 

 

This problem started today.i didnt make any changes.

 

line 74 in application_top.php is

 

// initialize the logger class

require(DIR_WS_CLASSES . 'logger.php');

 

i am running out of ides on what to do.

 

regards

 

irfan

Link to comment
Share on other sites

logger.php does not appear to be a standard component of osCommerce. Have you installed any contributions recently? It appears that the installation was not completed properly.

 

-jared

Link to comment
Share on other sites

logger.php does not appear to be a standard component of osCommerce. Have you installed any contributions recently? It appears that the installation was not completed properly.

 

-jared

 

stranege i was searching the forum while i found this.

http://www.oscommerce.com/forums/index.php?showtopic=157745 in this post u said logger.php is included in ms2 build.i just unzipped ms2 copy and logger.php is included.

 

so it appear to be there in the begining.

 

would appreciate any help..

 

many thanks

Link to comment
Share on other sites

Ahhh -- I only looked quickly in the non-admin area. I didn't see you mention admin, so I didn't look in there.

 

Additionally, acount_history_info.php is part of the catalog area, not part of the admin area. It's odd that when viewing acount_history_info.php, you'd get an error about looking for admin/includes/classes/logger.php.

 

Have you tried backing this file up and restoring acount_history_info.php from the original download?

 

If you post the contents of account_history_info.php we may be able to see what the problem is.

Link to comment
Share on other sites

Ahhh -- I only looked quickly in the non-admin area. I didn't see you mention admin, so I didn't look in there.

 

Additionally, acount_history_info.php is part of the catalog area, not part of the admin area. It's odd that when viewing acount_history_info.php, you'd get an error about looking for admin/includes/classes/logger.php.

 

Have you tried backing this file up and restoring acount_history_info.php from the original download?

 

If you post the contents of account_history_info.php we may be able to see what the problem is.

 

here is the file

<?php

/*

$Id: account_history_info.php,v 1.100 2003/06/09 23:03:52 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('admin/includes/application_top.php');

 

if (!tep_session_is_registered('customer_id')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

if (!isset($HTTP_GET_VARS['order_id']) || (isset($HTTP_GET_VARS['order_id']) && !is_numeric($HTTP_GET_VARS['order_id']))) {

tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));

}

$customer_info_query = tep_db_query("select customers_id, orders_status from " . TABLE_ORDERS . " where orders_id = '". (int)$HTTP_GET_VARS['order_id'] . "'");

$customer_info = tep_db_fetch_array($customer_info_query);

$orders_status = $customer_info['orders_status'];

if ($customer_info['customers_id'] != $customer_id) {

tep_redirect(tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));

}

 

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ACCOUNT_HISTORY_INFO);

 

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'));

$breadcrumb->add(sprintf(NAVBAR_TITLE_3, $HTTP_GET_VARS['order_id']), tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $HTTP_GET_VARS['order_id'], 'SSL'));

 

require(DIR_WS_CLASSES . 'order.php');

$order = new order($HTTP_GET_VARS['order_id']);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="admin/stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

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

<!-- header_eof //-->

 

<!-- body //-->

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

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

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

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

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

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

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

<tr>

<td class="main" colspan="2"><b><?php echo sprintf(HEADING_ORDER_NUMBER, $HTTP_GET_VARS['order_id']) . ' <small>(' . $order->info['orders_status'] . ')</small>'; ?></b></td>

</tr>

<tr>

<td class="smallText"><?php echo HEADING_ORDER_DATE . ' ' . tep_date_long($order->info['date_purchased']); ?></td>

<td class="smallText" align="right"><?php echo HEADING_ORDER_TOTAL . ' ' . $order->info['total']; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<?php

if ($order->delivery != false) {

?>

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo HEADING_DELIVERY_ADDRESS; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td>

</tr>

<?php

if (tep_not_null($order->info['shipping_method'])) {

?>

<tr>

<td class="main"><b><?php echo HEADING_SHIPPING_METHOD; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo $order->info['shipping_method']; ?></td>

</tr>

<?php

}

?>

</table></td>

<?php

}

?>

<td width="<?php echo (($order->delivery != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

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

<?php

if (sizeof($order->info['tax_groups']) > 1) {

?>

<tr>

<td class="main" colspan="2"><b><?php echo HEADING_PRODUCTS; ?></b></td>

<td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td>

<td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td>

</tr>

<?php

} else {

?>

<tr>

<td class="main" colspan="3"><b><?php echo HEADING_PRODUCTS; ?></b></td>

</tr>

<?php

}

 

for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {// Begin RMA Returns

if ($order->products[$i]['return'] == '1') {

$rma_query_one = tep_db_query("SELECT returns_id FROM " . TABLE_RETURNS_PRODUCTS_DATA . " where products_id = '" . $order->products[$i]['id'] . "' and order_id = '" . $HTTP_GET_VARS['order_id'] . "'");

$rma_query = tep_db_fetch_array($rma_query_one);

$rma_number_query = tep_db_query("SELECT rma_value FROM " . TABLE_RETURNS . " where returns_id = '" . $rma_query['returns_id'] . "'");

$rma_result = tep_db_fetch_array($rma_number_query);

 

$return_link = '<b>' . TEXT_RMA . ' # <u><a href="' . tep_href_link(FILENAME_RETURNS_TRACK, 'action=returns_show&rma=' . $rma_result['rma_value'], 'NONSSL') . '">' . $rma_result['rma_value'] . '</a></u></b>';

} else {

$return_link = '<a href="' . tep_href_link(FILENAME_RETURN, 'order_id=' . $HTTP_GET_VARS['order_id'] . '&products_id=' . ($order->products[$i]['id']), 'NONSSL') . '"><b><u>' . TEXT_RETURN_PRODUCT .'</a></u></b>';

}

// Don't show Return link if order is still pending or processing

// You can change this or comment it out as best fits your store configuration

// My first contribution to anything open source, a bug fix to a long running RMA system. These were the changes I had to make to get it to work with a 2.2MS2 install.

 

if (($order->info['orders_status'] == 'Pending') OR ($order->info['orders_status'] == 'Processing')) {

$return_link = '';

}

echo ' <tr>' . "\n" .

' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .

' <td class="main" valign="top">' . $order->products[$i]['name'];

if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) {

for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) {

echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>';

}

}

echo $return_link;

// JLM: End RMA Returns

 

echo '</td>' . "\n";

 

 

 

if (sizeof($order->info['tax_groups']) > 1) {

echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n";

}

 

echo ' <td class="main" align="right" valign="top">' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main"><b><?php echo HEADING_BILLING_ADDRESS; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_PAYMENT_METHOD; ?></b></td>

</tr>

<tr>

<td class="main"><?php echo $order->info['payment_method']; ?></td>

</tr>

<?php

// Company PO Account start

if($order->info['payment_method'] == 'Purchase Order Account')

{

?>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_PURCHASE_ORDER_NUMBER; ?><br>

<td class="main"><?php echo $order->info['purchase_order_number']; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo ENTRY_PURCHASE_ORDER_AVAILABLE_CREDIT_BALANCE; ?><br>

<td class="main"><?php echo $order->info['customers_credit_left']; ?></td>

</tr>

<?php

// Company PO Account end

}

?>

</table></td>

<td width="70%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

for ($i=0, $n=sizeof($order->totals); $i<$n; $i++) {

echo ' <tr>' . "\n" .

' <td class="main" align="right" width="100%">' . $order->totals[$i]['title'] . '</td>' . "\n" .

' <td class="main" align="right">' . $order->totals[$i]['text'] . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</table></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo HEADING_ORDER_HISTORY; ?></b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">

<?php

$statuses_query = tep_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int)$languages_id . "' order by osh.date_added");

while ($statuses = tep_db_fetch_array($statuses_query)) {

echo ' <tr>' . "\n" .

' <td class="main" valign="top" width="70">' . tep_date_short($statuses['date_added']) . '</td>' . "\n" .

' <td class="main" valign="top" width="70">' . $statuses['orders_status_name'] . '</td>' . "\n" .

' <td class="main" valign="top">' . (empty($statuses['comments']) ? ' ' : nl2br(tep_output_string_protected($statuses['comments']))) . '</td>' . "\n" .

' </tr>' . "\n";

}

?>

</table></td>

</tr>

</table></td>

</tr>

<?php

if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php');

?>

 

 

 

<!-- start pdf //-->

 

<?php

// only display pdf invoice link if * latest * order status is 3 (delivered)

$delivered_query = tep_db_query("select max(osh.date_added) as los, osh.orders_status_id from " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int)$HTTP_GET_VARS['order_id'] . "' group by osh.orders_status_id order by los desc limit 1");

 

$delivered_status = tep_db_fetch_array($delivered_query);

if ($delivered_status['orders_status_id'] == 3){

?>

<tr>

<td class="main"><b><?php echo PDF_INVOICE; ?></b></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td class="main"><?php echo tep_image(DIR_WS_IMAGES . 'pdf.gif', 'PDF invoice','','','style="vertical-align:middle"') . sprintf(PDF_DOWNLOAD_LINK,

tep_href_link(FILENAME_CUSTOMER_PDF, 'order_id=' . $HTTP_GET_VARS['order_id'] , 'SSL')); ?></td>

</tr>

</table>

</td>

</tr>

<?php

}

?>

<!-- end pdf //-->

<?php ?>

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

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

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, tep_get_all_get_params(array('order_id')), 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

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

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

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

<!-- footer_eof //-->

<br>

</body>

</html>

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

Link to comment
Share on other sites

Near the top, it says this:

  require('admin/includes/application_top.php');

 

when it should say this:

  require('includes/application_top.php');

 

You're also getting the stylesheet from admin as well.

 

Who edited this page, anyway? You should use something like WinMerge to compare it with the original and see what other weird things there might be.

 

-jared

Link to comment
Share on other sites

Near the top, it says this:

  require('admin/includes/application_top.php');

 

when it should say this:

  require('includes/application_top.php');

 

You're also getting the stylesheet from admin as well.

 

Who edited this page, anyway? You should use something like WinMerge to compare it with the original and see what other weird things there might be.

 

-jared

 

 

you are right. i spotted the error after i posted..

 

many thanks for all your help

 

regrads

 

nafri

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...