How to fix "setupUpdateDatabase: ERROR A downgrade attempt has been detected. Downgrade is unsupported."

  • Hi all,


    I got some PHP 5.6.24 problems with my Wordpress installation. Thus, I decided to upgrade my PHP version to 7.0.10 which worked fine by the way, I guess. I removed (purged) all php5 settings and php7 was active by default. After that, I have tried to login in the admin panel and got the message that mcrypt is not working. After googling, I found out that php7 ist not supported to host i-MSCP. Thus, I rolled everything back. After that, the backend and frontend still did not work, thus I decided to run the installer again.


    The installer breaks at


    setupUpdateDatabase: ERROR A downgrade attempt has been detected. Downgrade is unsupported.


    But I didn't touch any mysql things, I didnot down- or upgrade mysql, it's still on 5.7.


    How can I fix this issue?



    Thanks,
    Sven

  • setupUpdateDatabase: ERROR A downgrade attempt has been detected. Downgrade is unsupported.


    You receive this message if you try to dowgrade i-MSCP.


    BTW: Latest code (at least code from 1.3.x) is supporting PHP 7 (even for the frontEnd).

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

  • Hi Nuxwin,


    I will try PHP7 again, but I had troubles with the mcrypt module. I have downloaded the 1.3.0 version and still got that error. Before that, I had 1.3.0 installed, too.


    Is there a newer version availbe? Ninos fixed my install last time, maybe he used a more up to date version?



    Thanks,
    Sven

  • Be sure that the php7.0-mcrypt is installed and enabled


    Code
    1. apt-get install php7.0-mcrypt
    2. phpenmod mcrypt


    Once done, rerun the installer.

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

  • Hi Nuxwin,


    the problem is that once I started the installer, it automatically downloads and configures the php5 environment, even it is not present but php7 is. Is there a switch to turn that off?


    Do you have any idea how to get ridd of the downgrade message?


    Thanks,
    Sven

  • To be able to answer and give you the right answer, I need to know your Distro and codename and also from which repository you installed PHP 7

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

  • Hi,


    I am using Debian 8.5 and the following repositories for PHP 7 and PHP 5.6:


    deb http://packages.dotdeb.org jessie all
    deb-src http://packages.dotdeb.org jessie all


    If you like you can have a look on my server. The public key is still available, but not active. I will post the password in a private message to you.


    Thanks,
    Sven

  • So, you must adapt the packages file for Debian Jessie:


    You must change https://github.com/i-MSCP/imsc…n/packages-jessie.xml#L28 to make it look like: https://github.com/i-MSCP/imsc…/packages-stretch.xml#L28

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

  • @TheRiddler1982


    About your downgrade problem. Last db revision for i-MSCP version 1.3.0 is: 230 (see https://github.com/i-MSCP/imsc…ian/database/database.sql)


    But on your server, last db revision that was applied is 241. This mean that you upgraded to 1.3.x at some point...


    Thus, now you have not other choice than upgrading to last 1.3.x (what I'll do).

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