Forums / General Questions / PHP Fatal error: Cannot redeclare class order -- after changing domain name

PHP Fatal error: Cannot redeclare class order -- after changing domain name

Locked

Views: 4,467

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
28 Oct 2009, 6:30 PM
#1
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

PHP Fatal error: Cannot redeclare class order -- after changing domain name

I'm really hoping someone can help me out. I've been stuck on this problem for a few days.

I had a site running fine but when we decided to change the domain name and site name after the transfer the checkout pages don't work. I must have not renamed something or am missing something.

I receive a blank page during checkout_shipping, checkout_payment and checkout_confirmation.
I have no extra payment, shipping or order total modules installed. I re uploaded all the core modules from a fresh version of zen cart. and still nothing.

It works when I switch the template to classic so it must have been something I changed in all the template names that screw it all up.
When i run the debug tool I get this message.

PHP Fatal error: Cannot redeclare class order in /home7/ropteren/public_html/hometownseeds/includes/classes/order.php on line 1018

Everything works fine except for the checkout. I'm really anxious to have everything finished so any suggestion would be extremely appreciated. I've looked through as many forums as I could find and tryed all the suggestions so far. It has to be something simple since it was working properly before. Id really rather not have to install a fresh version of zen cart.

Thanks!

Heres the sites link if it helps:

https://www.hometownseeds.com

28 Oct 2009, 10:18 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

In your Zen Cart Admin in the Tools ... Developers Tool Kit ... do a search in the bottom input box on:
class order

and see what files come up ... there should be only one ... and that should be in:
/includes/classes/order.php

see if you have either bak files or mixed languages/code files ... :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

29 Oct 2009, 2:26 AM
#3
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

I searched "class order" using the developers toolkit and got 3 files.

/home7/ropteren/public_html/hometownseeds/includes/classes/order.php
Line #19 : class order extends base {

/home7/ropteren/public_html/hometownseeds/includes/classes/order_total.php
Line #20 : class order_total extends base {

/home7/ropteren/public_html/hometownseeds/pro1/includes/classes/order.php
Line #9 : class order {

I've tried putting the complete default language folder... Still nothing.
I've tried putting the complete default template folder... Still nothing.
I've tried putting the 3 default files that it pops up with "class order"... Still nothing.

I'm open for any suggestions. I don't know where it could be linked to my template since it only works when the classic green template is enabled.

29 Oct 2009, 2:28 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Have you tried turning off all your so-called SEO addons and removing all their redirects from your .htaccess?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Oct 2009, 2:43 AM
#5
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

I tried disabling SSU and removing the .htaccess and still nothing.

Everything works fine on the classic template with the SSU add on.

I'm running out of ideas!

29 Oct 2009, 3:05 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Please explain more of what was going on before this started happening. You talked about changing domain/site name, amongst other things. What exactly did you change? Why? How? etc

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Oct 2009, 3:30 PM
#7
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

I basically kept the entire site.
Changed the store folder to the new domain name, and directed a different URL to it.
Then I changed all the links and names to the new correct store name.
I changed the name of the template to correlate the new store name and i'm afraid theres a part that I forgot to change and am missing it somewhere.
It was a fairly simple change and everything works totally fine except for checkout.
Checkout used to work fine before I had changed everything.

29 Oct 2009, 4:40 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

In your configure.php files, do you have ENABLE_SSL set to true? If so, change it to 'false' and test checkout. Does that make any difference?

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Oct 2009, 4:55 PM
#9
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

It is set to false but does not work under true either.

Could I have messed up some core file that requires a fresh install of Zen Cart?
Or could it be a problem in the database that i'm going to have no idea how to fix? Haha

I really appreciate the replys. You guys are awesome!

29 Oct 2009, 5:51 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

The first thing I'd do would be a FULL evaluation of ALL files on your server, comparing them against the ORIGINAL Zen Cart files. Looking for any extra files not added intentionally, and any altered files that contain changes you didn't put there intentionally. Evaluate EVERY discrepancy to see if it causes looping back through the regular order process for some odd reason.
http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues
WinMerge

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Feb 2010, 10:06 AM
#11
whippetblue avatar

whippetblue

New Zenner

Join Date:
Feb 2010
Posts:
4
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Hi,
One solution to this problem:

I got exactly the same error message:

PHP Fatal error: Cannot redeclare class order in zencart/includes/classes/order.php on line 1018

In my case it was caused by the file zencart/includes/configure.php. The '?>' was missing at the end of the file. I had obviously deleted it without knowing (and then made it read only). The strange thing is that it did not affect the running of the application, apart from the checkout, when it generated the error quoted above.

Regards,

  • Jim
22 Feb 2010, 10:32 AM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

whippetblue:

In my case it was caused by the ... '?>' was missing at the end of the file.
Actually, no, that would NOT be the cause of any such error.
ref: https://www.zen-cart.com/tutorials/index.php?article=313

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Mar 2010, 9:49 PM
#13
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Still having some problems. The checkout shipping address page shows up blank. When I try and add a separate shipping address it shows up blank but when I try and add a separate billing address it pops up. Everything works completely fine except when I try to add a separate shipping address.
The php error message I get is:
PHP Fatal error: Cannot redeclare class order in /home3/hometox7/public_html/includes/classes/order.php on line 1018
There are now extra order total, shipping, or payment modules added in.
Not sure where else to start looking for the problem.
SSL enabled but won't work on or off.
Any help would be much appreciated it.

28 Mar 2010, 12:05 AM
#14
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

bluewire:

There are now extra order total, shipping, or payment modules added in.

This is meant to say NO extra order total, shipping, or payment modules added in.
Any Suggestions?

30 Mar 2010, 6:43 AM
#15
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Just an update for anyone finding this post. I finally concluded it was the side box shopping cart that was causing the new shipping address button to malfunction during checkout.
If anyone has a solution to what would make the side box shopping cart do this it would be appreciated.

31 Mar 2010, 3:45 AM
#16
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Hi bluewire,

I'm seeing the same php error... and like yourself, I've tried everything I can think of so far.
Do you mind me asking how you narrowed the issue down the side box? Did you see a difference when you diffed your files vs an original version?

Thanks.

31 Mar 2010, 6:41 AM
#17
bluewire avatar

bluewire

New Zenner

Join Date:
Oct 2009
Posts:
13
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

I first realized it would work for the classic zen cart template but not my template. So I was able to eliminate a lot of files that were used for both templates and then knew it had to be files associated with the template I was using.
The classic template didn't display all the side boxes I had set up because they weren't enabled. So I try disabling the ones in the other template one by one til I found which one is causing it.
Hope this helps!

31 Mar 2010, 8:47 AM
#18
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

Re: PHP Fatal error: Cannot redeclare class order -- after changing domain name

Sure does... thanks.