Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database error Need Help Puhleez!!!


bsharke

Recommended Posts

Hi......this error message is showing up in my footer and I have no idea how to correct it. <Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/blacklig/www/www/includes/functions/database.php:13) in /home/blacklig/www/www/includes/functions/database.php on line 13>

 

Could someone look at my database.php on line 13 and tell me how to correct it or better yet make the correction. I have only included the first 16 lines.

 

 

 

 

<?php

/*

$Id: database.php,v 1.21 2003/06/09 21:21:59 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

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

global $$link;

Thanks

 

Billy

Link to comment
Share on other sites

hi,

the key point is

Cannot redeclare tep_db_connect
this lets you know that this function has already been declared so you are noe looking for two instances of
function tep_db_connect
the idea being to delete or comment out one of them as you only require one.

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 Steve.....thanks for the reply. I wish I knew how to correct my problem with your reply but I have very lttle knowledge of working with php as you can see. I looked at my database.php but still unsure what to delete. If you could give me the correct code to enter there I would appreciate it.

Thanks

 

Billy

Link to comment
Share on other sites

what you need to do is search your files for instances of

function tep_db_connect
in order to see where the function is defined most likely would be catalog/includes/functions/general.php

or

catalog/includes/applications_top.php

 

in a default install the function is normally only declared in the database.php

 

do you have more that one declare of the

function tep_db_connect
in your database.php

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

as the catalog/includes/functions/database.php file is not a long one you could post the file to be checked

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

can you post the resolve to the issue in order to aid others whom find themselves with this issue or similar

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

Archived

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

×
×
  • Create New...