• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

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