• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

CreateSite with Api

K

KemalE

Guest
I'm testing Site Builder with api's.

When I create the site with api, I get an error when publishing the site.

Soap Fault Message: stdClass Object ( [PublishSiteResult] => stdClass Object ( [Status] => Failed [Details] => The site cannot be published to the specified location. The specified publishing settings are invalid. ) )

- However, logging into Site Builder Panel, find the site that I created with the API.

- Updating the data without changing the site settings (I don't change any data).

- Then the site publishing. (API's or Site Builder Panel)


Create Site Variables with PHP;
-------------------------------

$siteService = new Sitebuilder(SB_SERVICE_URL . 'SiteWebService.asmx?WSDL', array());
$siteService->setCredentialsHeader(SB_ADMIN_USERNAME, SB_ADMIN_PASSWORD);

$new_site_data = new stdClass();
$new_site_data->siteType = $_POST['siteType'];
$new_site_data->siteAlias = $_POST['siteAlias'];
$new_site_data->ownerId = $user->UserAccount->AccountId;
$new_site_data->publishingSettings = new stdClass();
$new_site_data->publishingSettings->Id = '';
$new_site_data->publishingSettings->Mode = 'Ftp';
$new_site_data->publishingSettings->StandardLocation = new stdClass();
$new_site_data->publishingSettings->StandardLocation->Address = $_POST['Address'];
$new_site_data->publishingSettings->StandardLocation->UserName = $_POST['UserName'];
$new_site_data->publishingSettings->StandardLocation->Password = $_POST['Password'];
$new_site_data->publishingSettings->StandardLocation->WorkingDirectory = $_POST['WorkingDirectory'];
$new_site_data->publishingSettings->StandardLocation->WebSiteUrl = $_POST['WebSiteUrl'];
$new_site_data->publishingSettings->StandardLocation->IsAnonymous = 'false';
$new_site_data->publishingSettings->StandardLocation->Veid = 0;
$new_site_data->publishingSettings->StandardLocation->VerifyStatus = 'Dynamic';
$new_site_data->publishingSettings->StandardLocation->LastVerifyAttempt = date('Y-m-d H:i:s');
$new_site_data->publishingSettings->StandardLocation->FallbackIP = $_SERVER['REMOTE_ADDR'];
$new_site_data->publishingSettings->StandardLocation->HostId = $_POST['HostId'];

$new_site = $siteService->sb_createSite2($new_site_data);

-------------------------------------------
Product name
Parallels Plesk Sitebuilder for Linux/Unix
Product version
4.5.0 Hotfix-20110711 (2011071115)
-------------------------------------------
 
And i want use to PlanWebService but have an error (Internal Server Error) on CreatePlan method. Tested your tutorials code too.
 

Similar threads

N
Replies
3
Views
3K
NicolasR
N
J
Replies
5
Views
4K
holykim66
H
I
Replies
0
Views
2K
ilkerburak
I
K
Replies
1
Views
2K
kbessinger
K
Back
Top