我在Google上找不到任何关于此的内容,我正在使用Plesk XML API和PHP,但是当我使用这段代码时:
//Add to Plesk
require("../../plesk-php-api.php");
$client = new PleskApiClient('broomfieldhosting.co.uk');
$client->setCredentials('admin', 'adminpassword');
//Webspace
$pleskDomainRequest = <<<EOF
<packet>
<webspace>
<add>
<gen_setup>
<name>flamingfireball64.com</name>
<htype>vrt_hst</htype>
<ip_address>104.238.170.144</ip_address>
</gen_setup>
<hosting>
<vrt_hst>
<ip_address>104.238.170.144</ip_address>
</vrt_hst>
</hosting>
<plan-name>pro</plan-name>
</add>
</webspace>
</packet>
EOF;
$pleskDomainResponseXML = $client->request($pleskDomainRequest);
我收到以下错误:
错误2204:无法更新主机首选项。系统用户更新失败:无法检查系统用户是否存在:登录名为空。字段不正确:“登录”。
据我了解,您想创建一个订阅flamingfireball64.com。您忘记指定系统用户名及其密码。 API下面可用于创建订阅。用你的数据替换我的数据。
<packet>
<webspace>
<add>
<gen_setup>
<name>testsubscription.test</name>
<ip_address>10.39.91.61</ip_address>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>someuser</value>
</property>
<property>
<name>ftp_password</name>
<value>somepassword</value>
</property>
</vrt_hst>
</hosting>
<plan-name>Unlimited</plan-name>
</add>
</webspace>
</packet>