PhpSwitcher nach Update fehler

  • Hallo,


    wollte mal PHPSwitcher updaten auf version 5.05 jetzt kommt da Unerwarteter Fehler und dieser Hinweis:


    SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'version_confdir_path_prev'; check that column/key exists


    kann mir jemand bitte Helfen dieses Problem zu lösen.


    Vielen Dank

    Gruss BigBen

  • Hi,

    I don't have this plugin, but you just need to find version_confdir_path_prev in the source and where you found drop before this name you must insert the "if exists".

    You will found something like this:

    drop column `version_confdir_path_prev`

    modify to this:


    drop column if exists `version_confdir_path_prev`

    OS: Debian Buster

    i-MSCP: GIT 1.5.3-maintenance branch

  • Hi first of all thanks

    That does not work drop column if exists

    now I have this message


    Plugin::PhpSwitcher::enable: DBD::mysql::db do failed: Unknown column 'version_name' in 'field list' at /var/www/imscp/gui/plugins/PhpSwitcher/backend/PhpSwitcher.pm line 1505, <$fh> line 184


    and when I click on retery it comes


    SQLSTATE [42000]: Syntax error or access violation: 1091 Can't DROP 'version_confdir_path_prev'; check that column / key exists

  • Hello BigBen


    Do you have the latest i-mscp version installed?

    Are you able to install the version you already used before? Don't forget to make a backup before.

    For me it looks like the database (or rather the tables for the phpswitcher plugin) is inconsistency.


    Currently I don't use the plugin but have worked with it a while, so I can't exactly say what's the problem.

  • Which OS / mySQL / i-MSCP version do you use?

    Colud you check the version of the database?


    SQL
    1. SELECT `value` FROM `imscp`.`config` where name='DATABASE_REVISION';

    OS: Debian Buster

    i-MSCP: GIT 1.5.3-maintenance branch

  • I checked this server tonight. The problem was caused by the /var/www/imscp/gui/plugins/PhpSwitcher/sql/*


    Maybe there was an sql error when BigBen updated the PhpSwitcher, but lot of sql executed before the error. So the next time when he tired the installation again then he has got another error because columns was droped already at the first update. We deleted the sql files until the actual error and retry the install again and again while this folder will be empty. After all sql executed the PhpSwitcher works again.

    So if you have similar error then check that sqls and you will found the error.

    OS: Debian Buster

    i-MSCP: GIT 1.5.3-maintenance branch