Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Error messages-Please advise


Recommended Posts

When clicking on a picture from the catalog page, I receive this error:


Fatal error: Cannot redeclare tep_set_banner_status() (previously declared in /home/jelegant/public_html/catalog/includes/functions/general.php:694) in /home/jelegant/public_html/catalog/includes/functions/banner.php on line 15


On line 15 of the banner.php is this:


// Sets the status of a banner

 function tep_set_banner_status($banners_id, $status) {-------->line 15

   if ($status == '1') {

     return tep_db_query("update " . TABLE_BANNERS . " set status = '1', date_status_change = now(),



Another error is if I select Buy Now this error comes up:


Fatal error: Call to undefined function: tep_has_product_attributes() in /home/jelegant/public_html/catalog/includes/application_top.php on line 364


On line 364 is:


 // performed by the 'buy now' button in product listings and review page

     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {

                              if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {------>line 364

                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));


FWIW, I have tried doing searches for the answers, but a search for "errors" comes up with nothing found?

Link to comment
Share on other sites

I don't know the answer to your question, but you might get more effect with your searches if you search for *tep_set_banner_status*. Searching for *errors* will get you lots of responses, but you probably won't want most of them...


You also may want to think about what contributions you installed recently. This kind of error (redeclare) usually occurs when a change from a contribution causes a file to be installed twice (sometimes recursively).




Link to comment
Share on other sites

Matt is correct in assuming you have installed a contribution that is causing the problem.... from what I can see, your general.php has been replaced by an earlier version that is not compatible.... it has a function that now resides in banner.php and is missing a function that should be there in the version of osCommerce you are running

Link to comment
Share on other sites

I am really confused now because the general.php file is the same one that I uploaded from the original, it is dated 7/12/2003


The only change made to that file was this:






   tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where products_id = '" . (int)$product_id . "'");




   tep_db_query("delete from " . TABLE_ADDITIONAL_IMAGES . " where products_id = '" . (int)$product_id . "'");


Is there more info I can supply so I can get this working? Thanks

Link to comment
Share on other sites

Update: I re-uploaded the original files with the 1 mod and now that error has disappeared but another is in its place:


When I click on Buy It:


Warning: Cannot modify header information - headers already sent by (output started at /home/jelegant/public_html/catalog/includes/languages/english.php:337) in /home/jelegant/public_html/catalog/includes/functions/general.php on line 29[/code]


On line 29 is:


// Redirect to another page or site

function tep_redirect($url) {

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL




header('Location: ' . $url);----->line 29






Link to comment
Share on other sites

  • 4 months later...


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

  • Create New...