I am trying to get the mailbuild module set up and running. I have got the module installed an the settings for my information entered. When I try to add a test user I get the error "warning: SoapClient::SoapClient() expects parameter 2 to be array, boolean given in". I looked into the code and it is the $client = new soapclient($wsdl, TRUE) line that is causing the error. I looked at the class for nusoap and the second parameter or the constructor seems to be a true or false variable. Anyone have any ideas? Thanks in advance.

Comments

SnowB1’s picture

I found the problem but not sure on how to fix it. It seems that the mailbuild_soap_call function when calling for the "new soapclient($wsdl, TRUE)" is actually calling php 5 soap client which are two different calls. I would think the "if (@include_once(realpath(mailbuild_nusoap_path())))" would make sure that it used the correct call, but it seems that it does not. Again any information would be appreciated. Thanks.

benkant’s picture

Assigned: Unassigned » benkant

That's right it appears to be calling the PHP5 SoapClient object.

I will install a PHP5 instance and get a fix to submitted shortly.

benkant’s picture

SnowB1,

I tested the module with PHP5 and it works for me.

Can you confirm that in admin/settings/mailbuild under the NuSOAP fieldset it says "NuSOAP library found"?

SnowB1’s picture

I checked my settings and it does say "NuSOAP library found". I am wondering now if it is a PHP5 setting maybe that needs changed. Also not sure if it matters I am using nusoap v. 0.7.3. I also tried changing the call from soapclient to nusoap_client to try to avoid the confusion with PHP but no luck there.

SnowB1’s picture

Thanks for the help. We did a update to our server last night and now everything seems to be fine. So it must have been a setting in our server. Thanks again.

ac’s picture

Status: Active » Fixed
warfeous’s picture

I was playing with the nusoap distro today (0.7.3) and received the same error.
"warning: SoapClient::SoapClient() expects parameter 2 to be array, boolean given in"

It is related to PHP5, which object names collides with the new soapclient() syntax (the PHP SOAP extension uses the same object name).

If you change your syntax in the constructor from "new soapclient()" to "new nusoap_client()", the collision won't happen - and everything will be happy. Nusoap keeps the old syntax for legacy support ("new soapclient"). But PHP5 won't like it.

[EDIT] After another read (meaning no kids screaming in the background), I see you've already tried this approach - keep my comment as a further explanation ;-) [/EDIT]

Hope that helps!
Michael

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Chris Gillis’s picture

Status: Closed (fixed) » Active

I am also having this problem.

Re-Opening based on #7
Line 178 should be changed from
$client = new soapclient($wsdl, TRUE);
to
$client = new nusoap_client($wsdl, TRUE);

dragonwize’s picture

Just a note this is not an issue with PHP5 by default. You have to configure PHP with --enable-soap for the collision to occur.

Still should be changed.

benkant’s picture

Committed to HEAD.

dragonwize’s picture

Version: 5.x-1.x-dev » 5.x-1.2
Category: support » bug
Status: Active » Fixed

Committed to D5 branch as well. Going to fix a couple other issues this change will show up in the 5.3 release.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.