• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

API problem 8.0 -> 8.1

A

AeroWave

Guest
Hello.
Has updated Plesk up to 8.1 and new users on API have ceased to be added, answers error 1001. What can it be?

Thanks.

ADD:

Use this:
PHP:
<?php

define('HOST', '000.000.000.000');
define('PORT', 8443);
define('PATH', 'enterprise/control/agent.php');

$url = 'https://' . HOST . ':' . PORT . '/' . PATH;

$headers = array(
      'HTTP_AUTH_LOGIN: admin',
      'HTTP_AUTH_PASSWD: setup',
'Content-Type: text/xml'
);

// initialize the curl engine

$ch = curl_init();

// set the curl options:
// do not check the name of SSL certificate of the remote server
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
// do not check up the remote server certificate
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
// pass in the header elements
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// pass in the url of the target server
curl_setopt($ch, CURLOPT_URL, $url);

$packet = <<<EOP
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.4.2.0">
<client>
<add>
   <gen_info>
       <cname>LogicSoft Ltd.</cname>
       <pname>Stephen Lowell</pname>
       <login>stevelow</login>
       <passwd>steve78</passwd>
       <status>0</status>
       <phone>416 907 9944</phone>
       <fax>928 752 3905</fax>
       <email>[email protected]</email>
       <address>105 Brisbane Road, Unit 2</address>
       <city>Toronto</city>
       <state/>
       <pcode/>
       <country>CA</country>
   </gen_info>
   <limits>
       <disk_space>100000</disk_space>
       <max_dom>50</max_dom>
       <max_subdom>250</max_subdom>
       <max_webapps>30</max_webapps>
       <max_traffic>50000</max_traffic>
       <max_db>200</max_db>
       <mysql_dbase_space>50000</mysql_dbase_space>
       <max_shared_ssl_links>50</max_shared_ssl_links>
       <expiration>1134616208</expiration>
   </limits>
   <permissions>
       <create_domains>true</create_domains>
       <manage_phosting>true</manage_phosting>
       <manage_quota>false</manage_quota>
       <manage_subdomains>true</manage_subdomains>
       <change_limits>true</change_limits>
       <manage_dns>true</manage_dns>
       <manage_log>true</manage_log>
       <manage_anonftp>true</manage_anonftp>
       <manage_webapps>true</manage_webapps>
       <manage_sh_access>true</manage_sh_access>
       <manage_maillists>true</manage_maillists>
       <make_dumps>true</make_dumps>
       <remote_access_interface>true</remote_access_interface>
       <cp_access>true</cp_access>
       <manage_domain_aliases>true </manage_domain_aliases>
   </permissions>
</add>
</client>
</packet>
EOP;

// tell CURL to return the result rather than to load it to the browser
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// pass in the packet to deliver
curl_setopt($ch, CURLOPT_POSTFIELDS, $packet);
// perform the CURL request and return the result
$retval = curl_exec($ch);
// close the CURL session
curl_close($ch);

echo $retval;

?>
 
are you watching the error coming back? Without the error I can't say much.
 
I have written... error 1001... A wrong name of the user. On 8.0 works, on 8.1.0 - is not present.
 
Back
Top