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

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows

Created:

2016-11-16 12:59:28 UTC

Modified:

2017-02-04 09:00:35 UTC

0

Was this article helpful?


Have more questions?

Submit a request

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

Symptoms

When trying to open subscription in Plesk the following error is shown:

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

At the same time the following error appears in /var/log/plesk/panel.log :

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

Database was not properly upgraded during Plesk upgrade, some fields in psa.hosting table are missing.

Resolution

  1. Create backup of psa database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysqldump -uadmin psa > psa.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. Here are hosting table description:

    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.