Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

contact_us.php error with included function


indieme

Recommended Posts

I attempted to add html into the the contact_us.php file in [path to catalog]/includes/languages/english/, and generated an error. So, I removed what I had edited and now get another error. I don't believe that I deleted any thing other than what I had added. I then downloaded a fresh copy of the cart and uploaded a new copy of contact_us.php but am still getting this error even when the browser has been refreshed:

 

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

 

Now, line 13 of the contact_us.php file has this:

require('includes/application_top.php');

 

This file does call tep_db_connect() but I do not see where it would be redeclared.

 

This is what it has:

 

// make a connection to the database... now

tep_db_connect() or die('Unable to connect to database server!');

 

Does anyone have any ideas on how to fix my error? I am new at this, just so you know.

Link to comment
Share on other sites

the error is saying line 13 of funcions/database.php which is this

 

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

 

This is a call to the database which will use the data from includes/configure.php section regarding database

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

There are two versions of contact_us.php: one goes in your catalog directory and the other in includes/languages/english/ (or other language of your choice.) Uploading the wrong one will cause this type of error.

 

If that is not the case, did you make any modifications to files other than contact_us.php at the same time?

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

I have made hundreds of modifications today, but this is the only thing I have broken so far... :) At the time I was only attempting to edit the contact page in the language/english folder.

 

Here's the index page and the contacts page. I am afraid that the contacts page may not help much.

http://indie-merch.com/index.phphttp://ind...62fa9e4fd7652ae

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...