Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal error:


AndyHearne2005

Recommended Posts

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /hsphere/local/home/andrewhe/dianescraftysupplies.co.uk/catalog/includes/functions/database.php:13) in /hsphere/local/home/andrewhe/dianescraftysupplies.co.uk/catalog/includes/functions/database.php on line 13

 

 

Just wondered what to do about this

 

Thanks

Link to comment
Share on other sites

Apparently you have 2 calls to require/include the includes/functions/database.php file. Remove the last one and all should be well.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Sorry i don't quite understand what you mean

 

Hi Andy,

 

Jim is saying that you have two instances of the function tep_db_connect() I would guess that your second instance has been created by a contribution that you have recently installed.

 

What contributions have you recently installed?

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

Hi Andy,

 

Jim is saying that you have two instances of the function tep_db_connect() I would guess that your second instance has been created by a contribution that you have recently installed.

 

What contributions have you recently installed?

 

 

Hi

 

Nothing as yet on this one as been trying out on a sub domain on another hosting account but plan to put a shipping contribution in and paragraphs

Link to comment
Share on other sites

Hi

 

Nothing as yet on this one as been trying out on a sub domain on another hosting account but plan to put a shipping contribution in and paragraphs

 

so this is a stock default install of osCommerce as can be downloaded from

http://www.oscommerce.com/solutions/downloads

 

what changes have you made to files, as this may give a clue.

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

so this is a stock default install of osCommerce as can be downloaded from

http://www.oscommerce.com/solutions/downloads

 

what changes have you made to files, as this may give a clue.

 

When i was under the weather last week and deleted the English files by accident - that's all i can remember i'm afraid

Link to comment
Share on other sites

so the admin side works ok and it is the catalog side not working?

 

you need to figure out what it is you were changing, look at server log files, etc

Link to comment
Share on other sites

so the admin side works ok and it is the catalog side not working?

 

you need to figure out what it is you were changing, look at server log files, etc

 

 

Sorry i'm not sure where they are

 

I'm also getting another error today as I installed a contribution for the product description but getting

 

Fatal error: Call to undefined function: tep_output_string() in /hsphere/local/home/andrewhe/dianescraftysupplies.co.uk/catalog/includes/functions/html_output.php on line 81

 

Copied from lines 72-100

 

////
// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = $image_size[0] * $ratio;
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = $image_size[1] * $ratio;
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;

Link to comment
Share on other sites

Sorry i'm not sure where they are

 

I'm also getting another error today as I installed a contribution for the product description but getting

 

Fatal error: Call to undefined function: tep_output_string() in /hsphere/local/home/andrewhe/dianescraftysupplies.co.uk/catalog/includes/functions/html_output.php on line 81

 

Copied from lines 72-100

 

////
// The HTML image wrapper function
 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
   if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
     return false;
   }

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
   $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
   }

   if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
     if ($image_size = @getimagesize($src)) {
       if (empty($width) && tep_not_null($height)) {
         $ratio = $height / $image_size[1];
         $width = $image_size[0] * $ratio;
       } elseif (tep_not_null($width) && empty($height)) {
         $ratio = $width / $image_size[0];
         $height = $image_size[1] * $ratio;
       } elseif (empty($width) && empty($height)) {
         $width = $image_size[0];
         $height = $image_size[1];
       }
     } elseif (IMAGE_REQUIRED == 'false') {
       return false;

 

Anyone?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...