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
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    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 ?

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

    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.

  3. #3
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,684
    Plugin Contributions
    123

    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."
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  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. v151 Fatal error Cannot redeclare class
    By sasha21 in forum General Questions
    Replies: 5
    Last Post: 21 Jul 2013, 03:21 AM
  2. Fatal error: Cannot redeclare class order
    By Oseymour in forum General Questions
    Replies: 7
    Last Post: 30 Jun 2009, 03:37 PM
  3. Fatal error: Cannot redeclare class un_productlist
    By pazdar in forum General Questions
    Replies: 2
    Last Post: 1 Jun 2008, 04:46 AM
  4. Fatal error: Cannot redeclare class template_func
    By jimh3768 in forum General Questions
    Replies: 1
    Last Post: 22 Jan 2008, 05:17 AM
  5. Fatal error: Cannot redeclare class moneyorder
    By bekinky in forum Customization from the Admin
    Replies: 2
    Last Post: 10 Mar 2007, 07:51 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR