Problems with new email accounts

  • @TheCry


    I'm able to reproduce:


    Shell-Script
    1. Last applied update: 270Last available update: 272[ERROR] Database update 272 failed: SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'domain_id'; check that column/key exists


    I've used following code to mock: test.php



    Now, I'll be able to fix the issue ;)

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

  • @TheCry


    Bug found and that is realy realy weird...


    Shell-Script
    1. root@buster:~# php updDB.phpLast applied update: 270Last available update: 272ALTER TABLE `php_ini` DROP INDEX `admin_id`ALTER TABLE `php_ini` DROP INDEX `domain_id`ALTER TABLE `php_ini` DROP INDEX `domain_id`


    So basically, last query should be ALTER TABLE `php_ini` DROP INDEX `domain_type` :


    PHP
    1. ...
    2. if (($dropQuery = $this->dropIndexByColumn('php_ini', 'domain_type'))) {
    3. foreach ($dropQueries as $dropQuery) {
    4. #execute_query($dropQuery);
    5. print "$dropQuery\n";
    6. }
    7. }
    8. ...

    but query returned is: ALTER TABLE `php_ini` DROP INDEX `domain_id` 8|?(<X

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

  • @TheCry


    Ok.. Typo there... Correct statement should be


    PHP
    1. if (($dropQueries = $this->dropIndexByColumn('php_ini', 'domain_type'))) {
    2. foreach ($dropQueries as $dropQuery) {
    3. execute_query($dropQuery);
    4. }
    5. }


    $dropQueries instead of $dropQuery in the if statement. That was simply wrong variable name used.. How a typo can lead to failure...

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

  • @TheCry @adrian.rico


    Regarding the database failure (r267), a fix has been added in our development branch. See https://github.com/i-MSCP/imsc…441c2c0ed564d71328a457872
    This fix will be part of next release.


    Thank you both for your report.

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

  • Hi @Nuxwin and @TheCry ,


    Thank you very much for your support.


    Our MySQL version is Ver 14.14 Distrib 5.5.57.
    And our i-MSCP current version is 1.2.9 and I was trying to upgrade to the latest stable one 1.5.1.


    Please let me know how to proceed, do you need finally anything from my side or you fixed it with the new update?


    Otherwise, please could you tell me about the installation mode? Is it better to use Auto or Manual mode?
    This is because as I said before when doing the setup of the install it is asking me for users and passwords of each service (dovecot, vsftp, mysql, phpmyadmin, ...) and I do not know if the ones being prompted are the same credentials used in the past, I don't want to fuck all the existing data.


    Thank you in advance.

  • Otherwise, please could you tell me about the installation mode? Is it better to use Auto or Manual mode?

    auto mode is best suitable for beginners.


    The issue is fixed in git version. You can upgrade using the https://github.com/i-MSCP/imsc…9c368c021bd2055b5d.tar.gz archive which old all bugfixes.

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

  • @adrian.rico


    You had extracted the imscp package on your server?


    You only need to replace the content of the file "gui/library/iMSCP/Update/UpdateDatabase.php" with this content https://github.com/i-MSCP/imsc…Update/UpdateDatabase.php
    After this run the setup


    EDIT BY NUXWIN: See below for the reason.


    Yes the same credentials will be used. Only some databse credentials which have special chars in the password must be changed.


    If you don't know how it works, it is possible to pay some money for exclussiv support and @Nuxwin will do the update for you ;)

  • You only need to replace the content of the file "gui/library/iMSCP/Update/UpdateDatabase.php" with this content github.com/i-MSCP/imscp/blob/1…Update/UpdateDatabase.php

    Not really <X


    The class has been refactored a lot. There is an abstract class now on top. He could copy the body of the r271 method (1.5.x branch) into the body of r267 method from version 1.5.1 but nothing more ;)

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