Articles in this section

Unable to access DigitalOcean DNS extension in Plesk: ERROR: Declaration of Plesk\Api\Client

Plesk for Linux kb: technical Ideal

Applicable to:

  • Plesk for Linux

Symptoms

When accessing DigitalOcean DNS extension in Plesk, the page fails to load with the error message:

PLESK_INFO: ERROR: Declaration of Plesk\Api\Client::request($request, $mode = self::RESPONSE_SHORT) must be compatible with PleskX\Api\Client::request($request, int $mode = self::RESPONSE_SHORT): PleskX\Api\XmlResponse (Client.php:21)

Cause

This is a DigitalOcean DNS extension bug with ID EXTPLESK-5375, which has already been fixed in extension version 1.4.3-649.

Resolution

Update the DigitalOcean DNS extension.

As a workaround, apply the following steps:

  1. Connect to the Plesk server via SSH.

  2. Rename the file Client.php:

    # mv /usr/local/psa/admin/plib/modules/digitaloceandns/library/shared/src/Plesk/Api/Client.php /usr/local/psa/admin/plib/modules/digitaloceandns/library/shared/src/Plesk/Api/Client.php.orig

  3. Download the patched Client.zip file:

    # wget https://support.plesk.com/hc/en-us/article_attachments/22466032830103 -O Client.zip

  4. Unzip the downloaded file:

    # unzip Client.zip

  5. Move the file to Digital Ocean Api directory:

    # mv Client.php /usr/local/psa/admin/plib/modules/digitaloceandns/library/shared/src/Plesk/Api/

Was this article helpful?

Comments

1 comment
Date Votes
  • If I tried it on several Plesks and everything works correctly, this was an excellent solution

    Thank you so much

    0

Please sign in to leave a comment.