Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannot redeclare tep_db_connect


Wendy James

Recommended Posts

Hello

 

I am getting the standard

 

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

 

error and i have been reading up on it on the forums and the osc doc site. Looks like it is suposed to mean I have a wrong file in my langauge folder but I have replaced every file in that folder.... and all my folders, actually (out of frustration lol) with no changes. I have checked for white spaces just incase, and viewed the checkout_confirmation.php and the language file for it and they are fine as far as I can tell.

 

The thing that is confusing me is I have this same exact site on my computer and I do not get any errors at all, and it was uploaded directly from the folders of the working site. The only difference between my computer and the web is that the web is secure. Could this be causing the problem?

 

Any suggestions would be appreciated because I am at a total loss here.

Thank you in advance =)

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

No one has any ideas? I am truly stumped and willing to try just about anything at this point. Thanks

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

The error message is simply pointing out that the tep_db_connect() function has now been declared twice. One of the files you replaced, or one of the files that a contribution replaced is probably re-including a faulty index.php file that in turn includes ANOTHER copy of application_top.php which of course includes another instance of tep_db_connect().

 

Your gonna have look thru which files you updated. I know that doesn't really help you but one of the files may be named correctly but has been placed in the wrong directory/folder. Usually, there is a "bug" fixed set of instructions for the faulty contribution, but if you did it then it might take time to check file sizes etc. between your working site and the one that is failing to find the faulty file.

 

HTH

Tom

Link to comment
Share on other sites

Thanks, I appreciate your responce. Unfortunetly I have compaired file sizes and so on and they all match up with what is on my computer (which is working fine) and I have not added or worked on any files since it was originally uploaded to my host... that is why I am stumped.

 

I have since replaced every file, compaired sizes, opened every single file connected with the one page with the error and can't find a thing.

 

I am getting the error on checkout_confirmation.php if that makes any difference.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

I assume then you checked

 

catalog/includes/languages/english/checkout_confirmation.php to make sure its the language "defines" and not the catalog/checkout_confirmation.php code by mistake?

 

Otherwise, you mentioned SSL. Sometimes the path to the SSL source is different than the NON-SSL.

 

Tom

Link to comment
Share on other sites

Yes, I checked that... and I was thinking it could be the ssl except for the fact that to get to the checkout_confirmation.php you already go through a couple of other ssl pages.

 

I really appreciate you responding, thank you.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Also, I have tried getting to that page by http and https with the same result.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Boy everything points to an overwritten language file somewhere.

 

Our "english" knowledge base has this message.

 

http://www.oscommerce.info/docs/english/e_...db_connect.html

 

A little different view from our German Knowledgebase "translated by Google"

 

http://translate.google.com/translate?hl=e...6lr%3D%26sa%3DG

 

If you have a good text search facility, search all your source for duplicate entries of database.php or application_top.php.

 

As the German page says "That makes it sometimes very heavy to find the actual error."

 

:-) keep smiling you'll find at some point.

 

Maybe someone else wants to chime in here to help Wendy.

 

Tom

Link to comment
Share on other sites

On your computer delete all your Temporary Internet Files, including Offline Content and your History Files. The problem may have been sorted but you may not be seeing it.

 

On your site, make sure that you are storing sessions in the database and not in files, and that Use Cache is set to False.

 

Vger

 

Hello

 

I am getting the standard

 

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

 

error and i have been reading up on it on the forums and the osc doc site. Looks like it is suposed to mean I have a wrong file in my langauge folder but I have replaced every file in that folder.... and all my folders, actually (out of frustration lol) with no changes. I have checked for white spaces just incase, and viewed the checkout_confirmation.php and the language file for it and they are fine as far as I can tell.

 

The thing that is confusing me is I have this same exact site on my computer and I do not get any errors at all, and it was uploaded directly from the folders of the working site. The only difference between my computer and the web is that the web is secure. Could this be causing the problem?

 

Any suggestions would be appreciated because I am at a total loss here.

Thank you in advance =)

Link to comment
Share on other sites

Thank you for the advice. I am unsure what the error was, never did figure it out but so far it seems fixed.

 

As I stated the page didn't work online but worked on my computer and I had written over all of the files online over and over again, compairing them line for line and so on with what was on my computer without any luck.

 

Wellllllll after hours of being a wee bit frustrated I made the mistake of downloading all of the files from the web into the folder I use to test on my computer and guess what? The error was recreated on my computer. LOL

 

I overwrote most of the files with original files and now have removed the error on my computer. Hoping it stays gone when I Upload. This is going to sound very very weird but I think it was the FTP program I was using. I noticed no matter what I did not all files I uploaded would upload at the rite size. Some are 10 kb and ened up 2 kb on my host or would be 4 kb and end up 20 kb. Makes no sense to me but I am crossing my finger that it was the program I was using. Went and got another and will never touch CuteFTP again. LOL

 

Thank you all so much for your help and suggesttions.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...