Articles in this section

Can't reconfigure Plesk domain: Invalid parameter number: no parameters were bound

DoNotDelete:docref Plesk for Linux kb: technical ABT: Group B

Applicable to:

  • Plesk for Linux

Symptoms

  1. The following warning is shown by the Plesk Pre-Upgrade Checker:

    CONFIG_TEXT: WARNING: Reference between several subscriptions and APS applications has been broken.

  2. The following error is displayed while making changes to the configuration of Plesk objects that assume Apache web server reconfiguration:

    PLESK_ERROR: Error: New files of configuration for Apache web server were not built due to errors in configuration templates. The detailed error message was e-mailed to you, so please check the e-mail, fix the errors, and click here to retry generating configuration.

  3. Backup creation fails with an error:

    CONFIG_TEXT: Unable to get APS instances on webspace id 123 (ErrorCode: 255, STDOUT:).

Cause

Plesk database inconsistency.

Resolution

  1. Connect to the server via SSH:

    Note: If direct SSH access to the server is not possible, contact server administrator for further assistance.

  2. Create a psa database dump:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin psa > /var/lib/psa/dumps/psadump.kb112815.`date "+%Y-%m-%d_%H:%M"`.sql

  3.  Log in to the Plesk database:

    # plesk db

  4. List configuration errors in Plesk database:

    MYSQL_LIN: mysql> select id,objectId,status,description from Configurations where status="error";
    +-----+----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | id | objectId | status | description |
    +-----+----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    | 5 | 1 | error | Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound |
    | 195 | 96 | error | Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound |
    | 205 | 101 | error | Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound |
    | 835 | 434 | error | Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound |
    | 837 | 435 | error | Template processing failed: file = /usr/local/psa/admin/conf/templates/default/domainVhost.php, error = SQLSTATE[HY093]: Invalid parameter number: no parameters were bound |
    +-----+----------+--------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

  5. List broken contexts of APS applications ( subscriptionId should be the same as MainSubscriptionId or AdditionalSubscriptionId ):

    MYSQL_LIN: mysql> select aps.id, pleskId, subscriptionId, s.id as MainSubscriptionId, su.id as AddSubscriptionId from apsContexts aps left join domains d on d.id=aps.pleskId left join domains w on w.id = d.webspace_id left join Subscriptions s on s.object_id=d.id left join Subscriptions su on su.object_id = w.id where (subscriptionId!=s.id and su.id is null) or (subscriptionId!=su.id and s.id is null) or aps.subscriptionId is null;

    +----+---------+----------------+--------------------+-------------------+
    | id | pleskId | subscriptionId | MainSubscriptionId | AddSubscriptionId |
    +----+---------+----------------+--------------------+-------------------+
    | 2 | 1 | 0 | 1 | NULL |
    | 3 | 96 | 96 | 75 | NULL |
    | 4 | 101 | 101 | 79 | NULL |
    | 5 | 434 | 0 | NULL | 75 |
    | 6 | 435 | NULL | NULL | 75 |
    +----+---------+----------------+--------------------+-------------------+
    5 rows in set (0.00 sec)

  6. Modify the broken contexts:

    MYSQL_LIN: mysql> update apsContexts set subscriptionId=1 where pleskId=1;
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> update apsContexts set subscriptionId=75 where pleskId=96;
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> update apsContexts set subscriptionId=79 where pleskId=101;
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> update apsContexts set subscriptionId=75 where pleskId=434;
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    mysql> update apsContexts set subscriptionId=75 where pleskId=435;
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

  7. Recreate all Apache configuration files:

    # /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.