• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Creating an account?????

J

jeffm@

Guest
I am having a problem trying to create an account for site builder through php. I am using the same code as the example scripts given but am getting an error about the plan id.

Am I missing something obvious?

The error:
Fatal error: Uncaught SoapFault exception: [soap:Server] Server was unable to process request. ---> Incorrect plan Parameter name: planId in F:\devel.www\hosting\includes\classes\sitebuilder\sitebuilder_client.php:26 Stack trace: #0 [internal function]: SoapClient->__call('CreateAccount', Array) #1 F:\devel.www\hosting\includes\classes\sitebuilder\sitebuilder_client.php(26): Utils_SoapClient->CreateAccount(Object(SoapVar)) #2 {main} thrown in F:\devel.www\hosting\includes\classes\sitebuilder\sitebuilder_client.php on line 26

my code:
$serviceUrl = 'http://blahblah.com.au:2006/ServiceFacade/4.1/';
$serviceLogin = 'login';
$servicePassword = 'password';
$accountService = new Utils_SoapClient ( $serviceUrl . '/AccountWebService.asmx?WSDL', array () );
$accountService->setCredentialsHeader ( $serviceLogin, $servicePassword );

$struct = new stdClass ( );
$struct->username = 'user';
$struct->password = 'pwd';
$struct->firstName = 'john';
$struct->lastName = 'ofl';
$struct->email = '[email protected]';
$struct->role = 'SiteOwner';
$struct->planId = '30b07cc2-1bb3-4cec-922f-ba1b5ebe5981';
$struct->changePasswordAllowed = 'true';

$svar = new SoapVar ( $struct, SOAP_ENC_OBJECT );
$result = $accountService->CreateAccount ( $svar );

the svar:
SoapVar Object
(
[enc_type] => 301
[enc_value] => stdClass Object
(
[username] => user
[password] => pwd
[firstName] => john
[lastName] => ofl
=> [email protected]
[role] => SiteOwner
[planId] => 30b07cc2-1bb3-4cec-922f-ba1b5ebe5981
[changePasswordAllowed] => true
)

)
 
Back
Top