Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error Message


zia

Recommended Posts

The second time I tried to acces the page of the address book, I got this error:

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /var/www/html/catalog/includes/functions/database.php:13) in /var/www/html/catalog/includes/functions/database.php on line 13

 

Any other time I have accessed this page, it appeared as expected with no error. I have never accessed the page noted in the message. What is going on, and how cn I fix it. Please help.

Link to comment
Share on other sites

  • 4 weeks later...

Looking for help on the same issue!

 

I just blew up my website after spending a few hours on content in the database. I accidentally uploaded a modified index.php file and immediately created this "redeclare" error when I tried to put the original file back up!

 

I had a brain fart, forgt I was working on dynamic pages when I uploaded a small change to index.php that was initially down-loaded using the HTML kit.....

 

By the way, what is the easiest way to modify the look feel of the header and sides of this web template?

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /var/www/html/modshop/includes/functions/database.php:13) in /var/www/html/modshop/includes/functions/database.php on line 13

 

Help, how do we get out of this quickly?

 

Thanks

Link to comment
Share on other sites

I looked in my home page 'index.php' for a connect string but could not find one. I checked out 'database.php' and did find the connection string.

 

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {

global $$link;

 

Are you sugesting that I remove this connect statement? If so, where else is it connecting?

 

I am somewhat new at the database side of things, please bare with me...

 

Thanks

Link to comment
Share on other sites

Just in case... one easy way to get a cannot redeclare message is when you back-up a file by calling it something like old_filename.php. The back-up file still gets parsed that way which can cause problems. This is especially true if you try to back-up any of the includes/classes files. It is best to back-up files by naming them something like filename.php.bak or filename.php.lck so that they are not parsed at all. Another possibility is if you accidentally upload the standard file into the includes/languages directory by mistake...can't count how many times I have made that screw-up. :D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...