Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php errors, not sure where to look


Guest

Recommended Posts

Hello All,

I have recently changed webhost, I have uploaded all files and sql, the site works but with the following error messages when accessing index.php?cPath=

Warning: reset() [function.reset]: Passed variable is not an array or object in /home/wwbb/public_html/index.php on line 51

 

Warning: Variable passed to each() is not an array or object in /home/wwbb/public_html/index.php on line 51

 

On line 51 in index.php I have the following:

<?php reset($lng->catalog_languages); while (list($key, $value) = each($lng->catalog_languages)) {

 

Another error appears at the bottom of the page saying:

Warning: error_log(/var/log/www/tep/page_parse_time.log) [function.error-log]: failed to open stream: No such file or directory in /home/wwbb/public_html/includes/application_bottom.php on line 20

 

On line 20 of application_bottom.php I have the following:

error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' - ' . getenv('REQUEST_URI') . ' (' . $parse_time . 's)' . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

 

Oscommerce worked fine with the previous host I was with, so I am not sure where to look. if anyone can advise where to look to fix this, I would appreciate very much.

 

regards,

John

Link to comment
Share on other sites

what version of oscommerce are you using?

Do you use a template system?

 

The error and code would normally relate to the includes/boxes/languages.php and includes/classes/language.php

 

  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> ';
 }

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...