Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

URGENT help with error


chewy

Recommended Posts

Hi

 

I was editing admin/index.php adding some links to the the links box when hitting the refresh I get this error

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/testsite/public_html/admin/includes/functions/database.php:13) in /home/testsite/public_html/admin/includes/functions/database.php on line 13

 

I have only been working with the index.php file and I have eben reloaded the backup "index.php" with the same result, so im at a loss to what I have done ??? please help ??

Link to comment
Share on other sites

Try posting your index.php. That might assist others in helping you.

See you on the dark side,

Kristy

 

I'm just a girl living in captivity

Your rules of thumb makes me worrisome

Link to comment
Share on other sites

try application_top in your includes directory, sounds like its trying to connect twice...

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Link to comment
Share on other sites

This error is definitely due to repeated tp_db_connect() function definitions. One possibility is:

 

Check the same file name under catalog/includes/languages/english. All files under this directory contain constant definition statements used in the same name pages. So most of pages have

 

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

 

Anyway, if the error occured, for example, when you load checkout_payment.php page then check the same name file under catalog/includes/languages/english/ and make sure you have constant definition php file, not the same name file under catalog/.

 

Sounds funny but it happned to me.

Link to comment
Share on other sites

  • 2 weeks later...

thank you, thank you, thank you!!

 

I could NOT figure out why i was getting the error! But I checked the 2 files and saw they were the same - definition one no longer in languages/english directory! Man, there's no way I overwrote this. Does this occur "automatically" for some reason? Do files get over-written if you do something else?

 

WEIRD! Hope it doesn't happen again - but thanks for taking time to explain fix!

:)

The fool thinks himself to be wise, but the wise man knows himself to be a fool. --William Shakespeare

Link to comment
Share on other sites

I could NOT figure out why i was getting the error! But I checked the 2 files and saw they were the same - definition one no longer in languages/english directory! Man, there's no way I overwrote this. Does this occur "automatically" for some reason? Do files get over-written if you do something else?

No files dont get overwritten automatically :)

 

The only way this could of happened is if you uploaded the main index file into the language directory by accident.

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

---------------------------------------

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...