Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error when loading Invoice Slip


Guest

Recommended Posts

Posted

I currently have an error on the invoice tab when I press it. This is located in the customers order section next to packing slip:

 

This is the error:-

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/nas03l/s/smartpackagingstore.com/user/htdocs/admin/includes/functions/database.php:13) in /home/nas03l/s/smartpackagingstore.com/user/htdocs/admin/includes/functions/database.php on line 13

 

have had a look around but can't seem to see anything wrong with the database or the line 13.

 

Cheers Richard

Posted
I currently have an error on the invoice tab when I press it. This is located in the customers order section next to packing slip:

 

This is the error:-

 

Fatal error: Cannot redeclare tep_db_connect() (previously declared in /home/nas03l/s/smartpackagingstore.com/user/htdocs/admin/includes/functions/database.php:13) in /home/nas03l/s/smartpackagingstore.com/user/htdocs/admin/includes/functions/database.php on line 13

 

have had a look around but can't seem to see anything wrong with the database or the line 13.

 

Cheers Richard

 

 

There are 2 database.php's you know this right? 1 in admin and one in catalog/includes. Check the admin one.

Posted
There are 2 database.php's you know this right? 1 in admin and one in catalog/includes. Check the admin one.

 

Cheers Matt,

 

I have had a look in both database.php files, but still can't fix my eyes on the problem.

 

this is what i have in admin/includes/functions/database.php on line 13

 

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

global $$link;

Posted
Cheers Matt,

 

I have had a look in both database.php files, but still can't fix my eyes on the problem.

 

this is what i have in admin/includes/functions/database.php on line 13

 

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

global $$link;

 

 

Its wierd. It says it cant redeclare which to me says the line of code is correct as it worked the first time or previously but isnt working the second time. since this code i assume has not been altered, perhaps it is just a host side error in MySQL. Is this the first time your have done this request through admin and received this error?

 

Matt

Posted
Its wierd. It says it cant redeclare which to me says the line of code is correct as it worked the first time or previously but isnt working the second time. since this code i assume has not been altered, perhaps it is just a host side error in MySQL. Is this the first time your have done this request through admin and received this error?

 

Matt

 

It has been working fine for the last few days, but I do admit I have changed the invoice.php to customise the out look but I have have put it back to the way it was.

 

I'll have to keep messing about.....the packaging slip works fine.....just not the invoic button.

Posted
It has been working fine for the last few days, but I do admit I have changed the invoice.php to customise the out look but I have have put it back to the way it was.

 

I'll have to keep messing about.....the packaging slip works fine.....just not the invoic button.

 

 

Just to be sure you didnt miss anything, get a default invoice.php and throw it back in there.

 

 

good luck.

Posted
Just to be sure you didnt miss anything, get a default invoice.php and throw it back in there.

good luck.

 

The lastest:

 

Have put all database.php files to default including the invoice.php

 

Does anyone have any ideas why the invoice.php cannot read from the data base.

 

This is the error I get when I try to open the invoice using the button in the admin area:

 

this is what i have in admin/includes/functions/database.php on line 13

 

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

global $$link;

Posted
The lastest:

 

Have put all database.php files to default including the invoice.php

 

Does anyone have any ideas why the invoice.php cannot read from the data base.

 

This is the error I get when I try to open the invoice using the button in the admin area:

 

this is what i have in admin/includes/functions/database.php on line 13

 

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

global $$link;

i have been reading up on this and apparently the database is being called up twice as there is a duplicate entry somewhere. One person sorted it by overwriting their english.php in language directory. copy the error you get , just the first line, not all of it and paste it in google and go through the links.

 

Hope it helps.

Posted
i have been reading up on this and apparently the database is being called up twice as there is a duplicate entry somewhere. One person sorted it by overwriting their english.php in language directory. copy the error you get , just the first line, not all of it and paste it in google and go through the links.

 

Hope it helps.

 

Have been through the google links and put the english.php's to default, but the that error still keeps on coming up.

 

Definate strange one......i'll try a few more links on the other forums and see what i come up with.

 

Thanks for your time Matt.

Archived

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

×
×
  • Create New...