• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question XML API connection issue

razor_sam

New Pleskian
I've been unsuccessful in trying to connect to the API (via PHP) using the methods commonly found online.
e.g.
$client = new \PleskX\Api\Client($host);
$client->setCredentials($username, $password);
$customers = $client->customer()->getAll();

and
$client = new PleskApiClient($host);
$client->setCredentials($username, $password);
$request = <<<EOF
<packet>
<server>
<get_protos/>
</server>
</packet>
EOF;
$response = $client->request($request);


But both methods throw an exception: "Failed connect to [host]:8443; No route to host". Any ideas what could be causing that?
 
Thanks for the reply. I can successfully connect to it using netcat via command line on my machine. But trying 'fsockopen' on my web application also results in "No route to host". I've checked the firewall modsec log but there aren't any corresponding entries.
Might have to pass onto our system admin.
 
Back
Top