1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

I am not getting any API response from the plesk panel.

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by Sam1315, Feb 9, 2010.

  1. Sam1315

    Sam1315 Guest

    Hi All,
    I am getting the following response: 'Empty reply from server'.
    ERROR: 52 (Nothing was returned from the server)
    I am not getting any response from the plesk panel.

    I am really not sure what could be wrong. When I use administrator user/pass to log on to the plesk panel, it works fine.

    I'm creating the following xml packet request;

    XML version is '1.0', with 'UTF-8' encoding.

    <packet version="">

    My cUrl request is :
    $ch = curl_init();
    $url = "https://xxxxxxxx:8443/enterprise/control/agent.php";
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "$packet");
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("HTTP_AUTH_LOGIN: {$login}",
    "HTTP_AUTH_PASSWD: {$password}",
    "HTTP_PRETTY_PRINT: TRUE","Content-Length: 1398",
    "Content-Type: text/xml"));

    My API RPC v.
    Plesk Panel version : 9.3.0
    OS of the control panel: CentOS (Linux 2.6.18-164.11.1.el5)

    Any help is greatly appreciated.

  2. IgorG

    IgorG Forums Analyst Staff Member

    Oct 27, 2009
    Likes Received:
    Novosibirsk, Russia
    Try to use following PHP script:

  3. Sam1315

    Sam1315 Guest

    Thank you for the quick response

    It worked and I have created new mail account.
    Please note the following changes. I hope it will help someone.

    1. Call-time pass-by-reference has been deprecated. So changed the call to:
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

    2. Use of undefined constant write_callback - assumed 'write_callback'.
    3. error 1014 Parser error: Request is invalid.
    (1014 Parsing error: wrong format of XML request.)
    Change the cp_access node to the currect format.

    Once again Thank you :)