Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2007
    Posts
    9
    Plugin Contributions
    0

    red flag Cannot redeclare class

    any ideas why this is happening?

    Fatal error: Cannot redeclare class authorizenet in /home/periodho/public_html/includes/modules/payment/authorizenet.php on line 15

    This is line 15: class authorizenet extends base {

    Due to this i can't access any payment modules.

    Cheers

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cannot redeclare class

    See if you left a copy of that payment module in your directory:
    /includes/modules/payment

    Those are autoloading directories ...
    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!

  3. #3
    Join Date
    Jan 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Cannot redeclare class

    Hey Ajeh,

    I have a copy in:

    /includes/modules/payment

    and

    /includes/languages/english/modules/payment.

    kinda lost now..

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cannot redeclare class

    Let me explain it a different way ...

    Usually when you see a duplicate class that means it is being called twice ...

    On the Modules for Payment, Shipping and Order Totals ... often times the cause is having a backup file or an attempted cloned file etc. in the directory ...

    As it is a self installing directory ... even if I loaded a copy of authorizenet.php renamed to fred.php it would trip the error due to the code inside ...

    If you look at your site via FTP ... peek in the:
    /includes/modules/payment

    Do you see extra copies of payment modules or one's you may be experimenting with?

    If so, remove them ...

    If still unsure ... go to Tools ... Developer's Tool Kit ...

    In the bottom input box enter:
    class authorizenet

    Select Catalog/Admin from the dropdown and click Search ...

    In the directory:
    /includes/modules/payment

    Only 1 file should be listed that has this code ...

    If you have more than one then that is the problem ...

    Note: do not mixup class authorizenet with class authorizenet_aim as those are separate modules ...
    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!

  5. #5
    Join Date
    Jan 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Cannot redeclare class

    i had placed a module in there yesterday "iPayment" which gave me an error (same kind) so i deleted it.

    Now i get this error with both authorize.net and authorize_aim.net

    Following was the result of the search in Dev's tk

    /home/periodho/public_html/includes/languages/english/modules/payment/authorizenet.php

    Line #14 : class authorizenet extends base {

    /home/periodho/public_html/includes/languages/english/modules/payment/authorizenet_aim.php

    Line #15 : class authorizenet_aim extends base {

    /home/periodho/public_html/includes/modules/payment/authorizenet.php

    Line #14 : class authorizenet extends base {

    /home/periodho/public_html/includes/modules/payment/authorizenet_aim.php


    Line #15 : class authorizenet_aim extends base {


    appreciate your help here Ajeh

    what method is used to install modules, just place them into folders via ftp?
    Last edited by (Deus); 2 Feb 2007 at 03:59 AM.

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cannot redeclare class

    You have overwritten the language files with copies of the code ...

    Reload the clean files for:
    /includes/languages/english/payment/authorizenet.php
    /includes/languages/english/payment/authorizenet_aim.php
    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!

  7. #7
    Join Date
    Jan 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Cannot redeclare class

    no idea how i did it but thanks Ajeh!

    so i'm guessing my initial problem with the iPayment module i tried to install needed to be different in modules/payment to the one in english/modules/payment?

    cheers

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cannot redeclare class

    Possibly ... one directory holds the code and the other the language file ...

    Mixing them up causes all kinds of havoc ...
    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!

  9. #9
    Join Date
    Jan 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: Cannot redeclare class

    As i've discovered!

    I've downloaded the payment module however without that second file i guess it's not going to work at all, seems i'll have to use OSC after all this...crap

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Cannot redeclare class

    When adding Payment modules ...

    1 They need to be written for Zen Cart and for the version of Zen Cart that you are using ...

    2 You need to load the files in the right directories
    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!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Fatal error Cannot redeclare class
    By sasha21 in forum General Questions
    Replies: 5
    Last Post: 21 Jul 2013, 03:21 AM
  2. Checkout :Cannot redeclare class order
    By fcegarra in forum General Questions
    Replies: 11
    Last Post: 13 Aug 2010, 09:31 PM
  3. Replies: 3
    Last Post: 3 Aug 2009, 06:13 AM
  4. cannot redeclare class base...
    By awhitley2 in forum General Questions
    Replies: 3
    Last Post: 23 Jun 2009, 02:02 PM
  5. Cannot redeclare class ot_coupon in
    By vixenz in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 16 Aug 2006, 09:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg