Unable to open a subscription/domain: Internal error: MySQL query failed: Unknown column 'fp' in 'field list'

Created:

2016-11-16 12:59:28 UTC

Modified:

2017-04-24 11:12:02 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to open a subscription/domain: Internal error: MySQL query failed: Unknown column 'fp' in 'field list'

Applicable to:

  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux

Symptoms

Unable to open subscription/domain in Plesk after an upgrade.

The following error is shown:

Internal error: MySQL query failed: Unknown column 'fp' in 'field list'

In the log file /var/log/plesk/panel.log the following error message appears:

PleskMainDBException: DB query failed:
select `dom_id`, `sys_user_id`, `ssl`, `fp`, `fp_ssl`, `fp_enable`, `fp_adm`, `fp_pass`, `ssi`, `php`, `php_handler_id`, `cgi`, `perl`, `python`, `fastcgi`, `miva`, `coldfusion`, `asp`, `asp_dot_net`, `webstat`, `same_ssl`, `traffic_bandwidth`, `max_connection`, `www_root`, `maintenance_mode`, `certificate_id` from `hosting` where `dom_id`=1

Error: Unknown column 'fp' in 'field list'
file: /usr/local/psa/admin/plib/db.php
line: 83
code: 0

Cause

Some fields in psa.hosting table are missing after a Plesk upgrade from 12.0 and lower.

Resolution

  1. Create a backup of the psa database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -uadmin psa > psa_backup.sql
  2. Login to database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysql -uadmin psa
  3. Add required fields to table, e.g.:

    mysql> ALTER TABLE `hosting` ADD `fp` enum('false','true') NOT NULL default 'false';
    mysql> ALTER TABLE `hosting` ADD `fp_ssl` enum('false','true') NOT NULL default 'false';
    mysql> ALTER TABLE `hosting` ADD `fp_enable` enum('false','true') NOT NULL default 'false';
    mysql> ALTER TABLE `hosting` ADD `fp_adm` varchar(20) NOT NULL;
    mysql> ALTER TABLE `hosting` ADD `fp_pass` varchar(20) NOT NULL;
  4. The psa. hosting table description looks as follows in Plesk after an upgrade from 12.0 and lower:

    mysql> desc psa.hosting;
    +-------------------------+----------------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +-------------------------+----------------------+------+-----+---------+-------+
    | dom_id | int(10) unsigned | NO | PRI | NULL | |
    | sys_user_id | int(10) unsigned | NO | | NULL | |
    | www_root | text | NO | | NULL | |
    | real_traffic | bigint(20) unsigned | YES | | 0 | |
    | fp | enum('false','true') | NO | | false | |
    | fp_ssl | enum('false','true') | NO | | false | |
    | fp_enable | enum('false','true') | NO | | false | |
    | fp_adm | varchar(20) | NO | | NULL | |
    | fp_pass | varchar(20) | NO | | NULL | |
    | ssi | enum('false','true') | NO | | false | |
    | php | enum('false','true') | NO | | false | |
    | cgi | enum('false','true') | NO | | false | |
    | perl | enum('false','true') | NO | | false | |
    | python | enum('false','true') | NO | | false | |
    | fastcgi | enum('false','true') | NO | | false | |
    | miva | enum('false','true') | NO | | false | |
    | coldfusion | enum('false','true') | NO | | false | |
    | asp | enum('false','true') | NO | | false | |
    | asp_dot_net | enum('false','true') | NO | | false | |
    | ssl | enum('false','true') | NO | | false | |
    | same_ssl | enum('false','true') | NO | | true | |
    | webstat | varchar(20) | NO | | none | |
    | traffic_bandwidth | int(11) | YES | | -1 | |
    | max_connection | int(11) | YES | | -1 | |
    | php_handler_id | varchar(255) | NO | | fastcgi | |
    | maintenance_mode | enum('false','true') | NO | | false | |
    | certificate_id | int(10) unsigned | YES | | 0 | |
    | fp_no_index | enum('false','true') | NO | | false | |
    | ssi_html | enum('false','true') | NO | | false | |
    | php_isapi | enum('false','true') | NO | | false | |
    | managed_runtime_version | varchar(255) | NO | | 1.1 | |
    | at_domains | enum('false','true') | NO | | false | |
    | write_modify | varchar(255) | NO | | | |
    | webdeploy | enum('false','true') | NO | | false | |
    +-------------------------+----------------------+------+-----+---------+-------+
Have more questions? Submit a request
Please sign in to leave a comment.