Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Posts
    7
    Plugin Contributions
    0

    red flag Fatal error: Cannot redeclare class soapclient

    Running into a problem here, I have just moved my site to a dedicated platform and am getting a problem that didn't exist before, sites comes up fine, however once I try to put something in my cart I get "Fatal error: Cannot redeclare class soapclient" I have read this is a conflict in the soap implementations between php and nusoap (as the problem is from the nusoap.php code - line 7239 (or the end of a bracket)). Not quite shore where the conflict is exactly and how to get rid of it. Any help would be appricated, thanks

    Debian 4.0, apache2, php5, dual-core amd.

    if you need any other information please ask..

    thx

    -sean

  2. #2
    Join Date
    Jan 2004
    Posts
    58,464
    Blog Entries
    3
    Plugin Contributions
    111

    Default Re: Fatal error: Cannot redeclare class soapclient

    "cannot redeclare class" means that somewhere in your program code that class is being loaded twice.
    You'll have to hunt down where it's loaded and stop it from loading a second time.
    Perhaps you have duplicate or backup copies of files that are getting automatically loaded ?

    http://tutorials.zen-cart.com/index.php?article=38
    http://tutorials.zen-cart.com/index.php?article=39
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    4,510
    Plugin Contributions
    127

    Default Re: Fatal error: Cannot redeclare class soapclient

    Sean, look for an "include" that should be "include_once" or a "require" that should be "require_once."
    Scott C Wilson, That Software Guy, Plugin Moderator
    Contributions: Quantity Discounts, Better Together, SMS on Sale, Gift Wrap at Checkout, and more.

  4. #4
    Join Date
    Sep 2007
    Posts
    7
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot redeclare class soapclient

    At this point I have chased it down to a buysafe problem, What is weird is that this was not a problem before I moved the server, which was from Fedora 7 to Debian 4, I have sent it to them to find, we will see

    -sean

  5. #5
    Join Date
    Jun 2008
    Posts
    6
    Plugin Contributions
    0

    Default Re: Fatal error: Cannot redeclare class soapclient

    I don't have a complete answer but the response I received from BuySafe support is below.
    The answer is incomplete because two problems were solved and a new one arose. I was now able to successfully authenticate the seal. I was able to see the button in the shopping cart. But when I went to checkout, I got a blank screen. I'll edit this post or reply if I get the rest of the solution. This solution should also work for OsCommerce and other similar carts.

    The 3 files can be downloaed from
    http://ifscal.net/nusoapPatch/nusoapPatch.zip

    Hello,

    Here's an explanation of why you are seeing the error:

    buySAFE uses the NuSOAP client, which declares 2 classes: 'soap_server'
    and 'soapclient'. PHP5 comes with an optional SOAP library (compile with
    '--with-soap'), which declares 2 classes: 'SoapServer' and 'SoapClient'.
    On machines that have this new PHP library installed, then there exists
    a namespace collision. We had to rename references to soapclient to
    nusoapclient in our implementation.

    To fix this, you will need to download and unzip the file that I have
    attached to this message:

    Save buysafe.php into \includes\modules\buySAFE\buysafe.php

    Save the other two files into both

    \includes\classes
    \admin\includes\classes

 

 

Similar Threads

  1. Fatal error: Cannot redeclare class base
    By apovey in forum General Questions
    Replies: 3
    Last Post: 25 Jun 2009, 05:08 AM
  2. Fatal error: Cannot redeclare class moneyorder
    By bekinky in forum Customization from the Admin
    Replies: 2
    Last Post: 10 Mar 2007, 07:51 PM
  3. Fatal error: Cannot redeclare class base:order
    By DogTags in forum Installing on a Linux/Unix Server
    Replies: 10
    Last Post: 13 Jan 2007, 02:58 PM
  4. Fatal error: Cannot redeclare class paypal
    By lorhan in forum General Questions
    Replies: 4
    Last Post: 29 Jul 2006, 03:57 PM

Bookmarks

Posting Permissions

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