PhpSwitcher

  • Hello,
    I have the update performed by imscp 1.1.1 to 1.1.2 and PHPswitcher 0.0.4 to 0.0.5.


    Unfortunately I get the update of the plugins PHPSwitcher an error. "Plugin update has failed: Unable to update: SQLSTATE [42S21]: Column already exists: 1060 Duplicate column name 'version_confdir_path_prev"


    delete or uninstall works both not always get an error
    downgrade to phpswitcher 0.0.4 not possible


    Edit:
    I have the phpswitcher directory is deleted and manually copied the data from version 0.0.4 in the imscp / gui / plugins. Then again was possible the downgrade to phpswitcher 0.0.4.


    Am I the only the problem?

  • Did you after uploading the version 0.0.5 click on the button "Update Plugins" in the lower right corner?
    I did upgrade a server to the version 1.1.2 and after this i did upgrade the plugin PhpSwitcher to the version 0.0.5.
    All works fine.

  • Hello,
    Unfortunately I get the update of the plugins PHPSwitcher an error. "Plugin update has failed: Unable to update: SQLSTATE [42S21]: Column already exists: 1060 Duplicate column name 'version_confdir_path_prev"


    This problem cannot occur if you are updating the plugin correctly. If you delete the plugin data from the plugin table without also removing the php_switcher_* tables and then try to install the plugin again, it's normal that you get such error. The plugin maintains a db_schema_version info which contains the last database migration which was applied. If this info was removed, the plugin will try to re-create that column, which explain the error.


    To resume, if you want update to last version now, do in order:

    • Remove the version_confdir_path_prev column from the php_switcher_version table
    • Upload the new version via the plugin management interface
    • Click on the Update Plugins button

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hello I have yes the update was performed according to instructions. Was also not the first time that I do it and so far has always worked. This time something went wrong.
    Now it works.
    I have uninstalled the plugin downgraded to 0.0.4 then uninstalled and the phpswitcher directory deleted by hand. Then the phpswitcher 0.0.5 reinstalled normally.
    No idea what went wrong but everything carried out routinely.
    the function to create vServer would be great
    Thans for making imscp

  • Hello I have yes the update was performed according to instructions. Was also not the first time that I do it and so far has always worked. This time something went wrong.
    Now it works.
    I have uninstalled the plugin downgraded to 0.0.4 then uninstalled and the phpswitcher directory deleted by hand. Then the phpswitcher 0.0.5 reinstalled normally.
    No idea what went wrong but everything carried out routinely.
    the function to create vServer would be great
    Thans for making imscp


    Well, today, I was able to reproduce the bug while updating plugin to next version (which is still under development)...


    Code
    1. An unexpected error occurred:
    2. Plugin update has failed: Unable to update: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'version_confdir_path_prev'


    I'll check so...


    Edit: This is due to the db_schema_version field which is not correctly incremented. It's 002 while it should be 003.


    @TheCry Please, can you go in PMA --> plugin table --> PhpSwitcher row ---> plugin_info field and say me what is the value for your db_schema_version field?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Re


    So it's ok... I'll do some test to be sure.


    @TheCry


    Problem found... When a plugin is deactivated and if you update it by uploading new version, and then click on the Update Plugins button, plugin info are not updated and so, when you re-activate the plugin, the needed update is not processed. It's fixed in my working copy. I'll commit ASAP. I'll surely re-activate the auto plugin list update on plugin upload too.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • PhpSwitcher plugin version 0.0.6 has been released in plugin store


    Version compatible with i-MSCP >= 1.1.2


    CHANGELOG

    • Fixed: HooksManager is already passed-in to plugin
    • Fixed: Wrong key name in deleteListener (memcached)
    • Fixed: Wrong SQL query in afterDispatchRequest event listener

    Documentation is available at http://wiki.i-mscp.net/doku.php?id=plugins:phpswitcher

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • PhpSwitcher plugin version 0.0.7 has been released in plugin store


    Version compatible with i-MSCP >= 1.1.2


    CHANGELOG

    • Fixed: Use of undefined constant SORT_NATURAL (PHP < 5.4)


    Documentation is available at http://wiki.i-mscp.net/doku.php?id=plugins:phpswitcher

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hello I once again I kinda crap built again.


    I want the newest version uppen and it comes the following error message to the fore the Act fours.


    Plugin installation has failed: Unable to install: SQLSTATE [42S01]: Base table or view already exists: 1050 Table '`` `imscp php_switcher_version`.' Already exists


    so I look at the db imscp on this but is not displayed as I get the book now loaded apz again.

    Files

    my System :

    - Distribution: Debian | Release: 9.13 | Codename: wheezy
    - i-MSCP Version: i-MSCP 1.5.3| Build: 20181208 | Codename: Ennio Morricone
    - Plugins installed: ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), SpamAssassin (v 2.0.1)
    - LetsEncrypt (v3.3.0), PhpSwitcher (v 5.0.5), RoundcubePlugins (v 2.0.2)YubiKeyAuth 1.1.0