Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cannnot redeclare Error in downloads_controller


Res55

Recommended Posts

Hi,

I just installed the downloads_controller and in the first test I got this message while klicking on the Checkout Button:

 

Fatal error: Cannot redeclare tep_get_configuration_key_value() (previously declared in /var/www/web543/html/catalog/includes/functions/downloads_controller.php:13) in /var/www/web543/html/catalog/includes/functions/downloads_controller.php on line 18

 

Any help is appreciated.

 

Andreas

SHP: OsCommerce 2.2 Milestone 2;

SQL für osC: MySQL 4.1.20-standard

SQL für CAO: MySQL 5.01 & MySQL-Client-Version: 4.0.24

SRV: AppServ Open Project 2.4.0

Server Version: 4.1.20-standard

PHP Version: 5.1.4 (Zend: 2.1.0)

SYS: Windows XP Home Edition SP2

CAO: Faktura 1.2.6.21 F; Kasse: no

 

Contributions:

CAO-OSC.PHP 1.53_496

Download_Controllerv5.3 MS2.2_2 Patched on Dec 6, 2006 by Yonny

Visitor Web Stats 3.1

UnsoldCartsReport_v2.1

keywords 1.3

Bank Transfer V1.1B

European Bank Transfer 1.9.1

HeaderTags_V_2.6.1

Link to comment
Share on other sites

Hi,

I just installed the downloads_controller and in the first test I got this message while klicking on the Checkout Button:

 

Fatal error: Cannot redeclare tep_get_configuration_key_value() (previously declared in /var/www/web543/html/catalog/includes/functions/downloads_controller.php:13) in /var/www/web543/html/catalog/includes/functions/downloads_controller.php on line 18

 

Any help is appreciated.

 

Andreas

 

I got almost the same issue... but mine says:

Fatal error: Cannot redeclare tep_get_configuration_key_value() (previously declared in /home/srise17/public_html/osc/includes/functions/downloads_controller.php:13) in /home/srise17/public_html/osc/includes/functions/downloads_controller.php on line 13

 

Were the errors point to the exact same location... Very Weird!

Link to comment
Share on other sites

I got almost the same issue... but mine says:

Fatal error: Cannot redeclare tep_get_configuration_key_value() (previously declared in /home/srise17/public_html/osc/includes/functions/downloads_controller.php:13) in /home/srise17/public_html/osc/includes/functions/downloads_controller.php on line 13

 

Were the errors point to the exact same location... Very Weird!

 

Yes, that is the same mistake I did.

And I finally solved it:

 

Just change every line in your code with

 

require(DIR_WS_FUNCTIONS . 'downloads_controller.php');

 

to

 

require_once(DIR_WS_FUNCTIONS . 'downloads_controller.php');

 

and it will work.

 

Andreas

SHP: OsCommerce 2.2 Milestone 2;

SQL für osC: MySQL 4.1.20-standard

SQL für CAO: MySQL 5.01 & MySQL-Client-Version: 4.0.24

SRV: AppServ Open Project 2.4.0

Server Version: 4.1.20-standard

PHP Version: 5.1.4 (Zend: 2.1.0)

SYS: Windows XP Home Edition SP2

CAO: Faktura 1.2.6.21 F; Kasse: no

 

Contributions:

CAO-OSC.PHP 1.53_496

Download_Controllerv5.3 MS2.2_2 Patched on Dec 6, 2006 by Yonny

Visitor Web Stats 3.1

UnsoldCartsReport_v2.1

keywords 1.3

Bank Transfer V1.1B

European Bank Transfer 1.9.1

HeaderTags_V_2.6.1

Link to comment
Share on other sites

Yes, that is the same mistake I did.

And I finally solved it:

 

Just change every line in your code with

 

require(DIR_WS_FUNCTIONS . 'downloads_controller.php');

 

to

 

require_once(DIR_WS_FUNCTIONS . 'downloads_controller.php');

 

and it will work.

 

Andreas

 

Thanks Andreas... I'll give it a try.

 

By any chance are the icons showing under your administration page - customers - orders???????

Link to comment
Share on other sites

Dang!...

 

It does not work on mine. I updated the codes on general.php and still give me the same issue.. What could be possibly wrong???? Did you change something else somewhere else????? Did you use Version 5.3b_MS2.2_2????? Now I am stocked... PLEASE HELP!!!

Edited by graphicore
Link to comment
Share on other sites

Dang!...

 

It does not work on mine. I updated the codes on general.php and still give me the same issue.. What could be possibly wrong???? Did you change something else somewhere else????? Did you use Version 5.3b_MS2.2_2????? Now I am stocked... PLEASE HELP!!!

 

I changed to "require_once" in 5 different files:

Take a took like Agent Ransack and look for every occurance of downloads_controller and change all files with the lines require to require_once.

 

As far as I know this can not be done TOO MUCH.

 

And no: I obviously did not use the Download_Controllerv5.3 MS2.2_2.zip but an enhanced version. A text-compare shows me: "Patched on Dec 6, 2006 by Yonny"

 

But I don't have it running yet. Just the mentioned error is gone.

 

Andreas

SHP: OsCommerce 2.2 Milestone 2;

SQL für osC: MySQL 4.1.20-standard

SQL für CAO: MySQL 5.01 & MySQL-Client-Version: 4.0.24

SRV: AppServ Open Project 2.4.0

Server Version: 4.1.20-standard

PHP Version: 5.1.4 (Zend: 2.1.0)

SYS: Windows XP Home Edition SP2

CAO: Faktura 1.2.6.21 F; Kasse: no

 

Contributions:

CAO-OSC.PHP 1.53_496

Download_Controllerv5.3 MS2.2_2 Patched on Dec 6, 2006 by Yonny

Visitor Web Stats 3.1

UnsoldCartsReport_v2.1

keywords 1.3

Bank Transfer V1.1B

European Bank Transfer 1.9.1

HeaderTags_V_2.6.1

Link to comment
Share on other sites

Did you use Version 5.3b_MS2.2_2????? Now I am stocked... PLEASE HELP!!!

 

Yes, I looked again and I used:

 

Download_Controllerv5.3b_MS2.2_2.zip

by yosutanto 7 Dec 2006

 

yours

Andreas

SHP: OsCommerce 2.2 Milestone 2;

SQL für osC: MySQL 4.1.20-standard

SQL für CAO: MySQL 5.01 & MySQL-Client-Version: 4.0.24

SRV: AppServ Open Project 2.4.0

Server Version: 4.1.20-standard

PHP Version: 5.1.4 (Zend: 2.1.0)

SYS: Windows XP Home Edition SP2

CAO: Faktura 1.2.6.21 F; Kasse: no

 

Contributions:

CAO-OSC.PHP 1.53_496

Download_Controllerv5.3 MS2.2_2 Patched on Dec 6, 2006 by Yonny

Visitor Web Stats 3.1

UnsoldCartsReport_v2.1

keywords 1.3

Bank Transfer V1.1B

European Bank Transfer 1.9.1

HeaderTags_V_2.6.1

Link to comment
Share on other sites

  • 3 weeks later...

I have the same error.

 

I tried adding require_once to

 

admin/includes/functions/general.php

includes/functions/general.php

includes/classes/shipping.php

includes/classes/payment.php

 

still no go ...

Link to comment
Share on other sites

  • 2 months later...

Same problem :

 

I have just installed on my MS2: " Downloads Controller v5.2 - MS1 yosutanto 7 Dec 2006" found here : http://www.oscommerce.com/community/contributions,994

 

 

And when accessing to this page : "http://www.xxxx.fr/catalog/checkout_shipping.php" I got :

 

Fatal error: Cannot redeclare tep_get_configuration_key_value() (previously declared in /home.3/kobra/www/test-osc/catalog/includes/functions/downloads_controller.php:13) in /home.3/kobra/www/test-osc/catalog/includes/functions/downloads_controller.php on line 13

 

I think that dowload_controller.php is included 2 times but I can't find how !

 

Did you finaly solve this problem ?

 

Thanks a lot !

Link to comment
Share on other sites

I wonder why I still got the problem since I change it too on about 3-4 files that contained that code. Now I am really stuck/screwed. I guess I am going to have to get deeper into this. I'll appreciate any help.

To anyone working on (like I am right now :)) - you also have to change to require_once... in the checkout_shipping file. Once I did this, everything was fine. So far, anyway.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...