Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / 1.3.7: Getting fatal error in order.php

1.3.7: Getting fatal error in order.php

Locked

Views: 2,099

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Jan 2007, 02:34
#1
ttalk avatar

ttalk

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
0

1.3.7: Getting fatal error in order.php

In Admin on 1.3.7, go to Reports -> Customers Referral, if I click on the edit button for any order, I get the following error:

Fatal error: Cannot redeclare class order in /home/tummyvt/public_html/<admin>/includes/classes/order.php on line 23

I already tried re-uploading the file, but that didn't help. The file version I have is below, with the line 23 following:

// $Id: order.php 4774 2006-10-17 06:47:16Z drbyte $
//
class order {
var $info, $totals, $products, $customer, $delivery;

I searched my directory and cannot find any other file that declares class order, only three files come up with anything similar:

includes\classes\order.php:class order extends base {
includes\classes\order_total.php:class order_total extends base {
<admin>\includes\classes\order.php: class order {

I had done a test upgrade from 1.3.5 to 1.3.6 this weekend before I upgraded fully from 1.3.5 to 1.3.7, and my test site with 1.3.6 displays the order information just fine after clicking on edit button.

If this isn't a bug, please let me know what else I should look for to fix this.

16 Jan 2007, 07:12
#2
ttalk avatar

ttalk

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
0

Re: 1.3.7: Getting fatal error in order.php

now that i'm learning a bit more about php, and doing a lot more searching on this site, i realized this may more of an issue on my side, and not a zencart bug. I searched and found out about autloading. I swept through and removed all files named <filename>.orig.php.

However I must've missed something somewhere because even though those files are removed, the error still exists.

Anyone have an idea of what folder might have the offending file? (or if this is even the problem?) I already windiffed my 1.3.7 and 1.3.6 archived folder, but still can't find any rogue files.

16 Jan 2007, 07:41
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 1.3.7: Getting fatal error in order.php

In the admin no files are overrideable and you most likely should not have any that are changed???? Try re-uploading the complete admin folder.

In the event that you alter a "Core" file that can not be overridden what I do is edit a copy and rename the original from <filename>.php. with <filename>.orig and leave it on the hosted files and replace it with my edited copy. This way you can prio to an upgrade scan the files for ?.orig and find the ones that you need to check and that will be over written,

16 Jan 2007, 14:18
#4
ttalk avatar

ttalk

New Zenner

Join Date:
Sep 2006
Posts:
27
Plugin Contributions:
0

Re: 1.3.7: Getting fatal error in order.php

thanks kobra. I windiff'd orders.php again and saw the problem - the location of "include(DIR_WS_CLASSES . 'order.php');" had moved to the top of the file in 1.3.7, but i was using admin profiles mod which had that line of code in the middle of the file and didn't remove it after I merged the above change. I ended up having that line of code in two places, which is what raised the error.

Removing the one in the middle fixed the problem. And thanks for the tip on the file rename for upgrade, i'll keep that in mind.

14 Jun 2007, 03:29
#5
rnet avatar

rnet

Zen Follower

Join Date:
Jun 2005
Location:
Pittsburgh
Posts:
99
Plugin Contributions:
0

Re: 1.3.7: Getting fatal error in order.php

I've confirmed that I'm using the correct versions.

The LOG file shows: PHP Parse error: parse error, unexpected T_CASE in /var/www/html/admin/orders.php on line 195

Suggestions?

09 Aug 2007, 16:37
#6
pcdesigns avatar

pcdesigns

New Zenner

Join Date:
Feb 2007
Posts:
76
Plugin Contributions:
0

Re: 1.3.7: Getting fatal error in order.php

rnet, I have that same error. Did you figure out what was causing the problem?