NuSOAP together with PHP5-SOAP

Every once in a while I get to fix/add stuff from my PHP days. Today I installed php5 on a fresh Ubuntu Feisty install I need to host a NuSOAP based service API to a client. However, the Ubuntu php module comes with SOAP support built in. The PHP bundled SOAP implementation is far from complete and I guess most folks still prefer the good ‘ol NuSOAP. The problem is this:



Cannot redeclare class soapclient



Both NuSOAP and PHP’s SOAP use the same class name for the client implementation. Instead of uninstalling Feisty’s PHP module and rolling my own I decided to simply patch the NuSOAP 0.7.2 .php file and rename the class to nusoapclient. Saves a boatload of time IMHO. Patch to NuSOAP 0.7.2

This entry was posted in Home and tagged . Bookmark the permalink.

2 Responses to NuSOAP together with PHP5-SOAP

  1. Isaac says:

    I JUST ran into this problem and you’re the only one I’ve seen with this fix…I’m looking forward to giving it a try, but I’m really not sure what to do with this DIFF file? I can see its a text file, and its got sections of code, but it looks like it’s formatted for some program to do code replacement in the nusoap.php file? Can you tell me which program it is that is supposed to do this? Otherwise, I can try to decipher what the section numbers mean and update nusoap.php manually…are the “-6392,7 +6392,7″ tags indicating line numbers? Just guessing at it so far…let me know, thanks!

  2. Isaac says:

    nevermind I just read up on SVN :)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>