• 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 BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Plesk XML API Error

Joni

New Pleskian
Hi,

Im trying to set via API a mysql remote allowed ip, the request:

Code:
<packet>
<database>
   <set-db-user>
    <id>$id</id>
    <allow-access-from>
       <ip-address>$externalIp</ip-address>
    </allow-access-from>
  </set-db-user>
</database>
</packet>

$id -> DB User ID
$externalIp -> The ip that i try to allow.

It returns:

Code:
object(PleskX\Api\XmlResponse)#2 (1) {
  ["status"]=>
  string(2) "ok"
}

If i ask to API about user info it returns:

Code:
object(PleskX\Api\XmlResponse)#2 (7) {
  ["status"]=>
  string(2) "ok"
  ["filter-id"]=>
  string(2) "21"
  ["id"]=>
  string(2) "23"
  ["login"]=>
  string(11) "xxxx_xxxx"
  ["db-id"]=>
  string(2) "21"
  ["acl"]=>
  object(PleskX\Api\XmlResponse)#3 (1) {
   ["host"]=>
   string(9) "localhost"
  }
  ["allow-access-from"]=>
  object(PleskX\Api\XmlResponse)#4 (1) {
   ["ip-address"]=>
   string(10) "X.X.X.X"
  }
}

i just replaced the real data for xxxxx

So, it should be working but nope, i cant connect...

If i enter vía Ples Admin (Web) and go to dbuser config the option marked is "Allow only local connections".

Any idea?

Many Thanks.
 
Last edited:
The second environment:

I made this request:

Code:
<packet>
<database>
   <set-db-user>
    <id>$id</id>
    <acl>
       <host>$externalIp</host>
    </acl>
  </set-db-user>
</database>
</packet>

And i got:

Code:
object(PleskX\Api\XmlResponse)#2 (7) {
  ["status"]=>
  string(2) "ok"
  ["filter-id"]=>
  string(2) "21"
  ["id"]=>
  string(2) "23"
  ["login"]=>
  string(11) "xxxx_xxxx"
  ["db-id"]=>
  string(2) "21"
  ["acl"]=>
  object(PleskX\Api\XmlResponse)#3 (1) {
   ["host"]=>
   string(10) "X.X.X.X"
  }
  ["allow-access-from"]=>
  object(PleskX\Api\XmlResponse)#4 (0) {}
}

Good! i can made a remote conection and if i enter via Plesk Admin (Web) the ip is showing up in the "Allow remote connection from" option.

Apparently it is correct, but no. Now deny the local connections made by the website (PHP).

So, none of the two environments are working as spected.

Any idea?
 
Last edited:
Back
Top