i-MSCP 1.5.1 - Domain restore feature - Modules::Domain::restore: Can't locate object method "selectall_array" ...

  • Hello,


    I tried to move a domain from a server with an older version of i-mscp (1.3.8) to my new server which has i-mscp 1.5.1 installed. So I downloaded the daily backup & uploaded into the backup folder of the new server's domain folder, and I clicked the latest daily backup restoration button. Now I can't even delete the domain, and nothing happened to the files. I checked the logs, the following error is showing there:

    Code
    1. [Tue Jan 9 16:24:31 2018] [fatal] iMSCP::DbTasksProcessor::_processModuleDbTasks: Modules::Domain::restore: Can't locate object method "selectall_array" via pa$
    2. ...propagated at /var/www/imscp/engine/PerlLib/iMSCP/DbTasksProcessor.pm line 496, <$fh> line 406.

    Any help would be much appreciated. It's pretty urgent to solve this problem, since I have to move 4-5 live websites from the old server.


    Thank you,
    Zsolt Gyure

  • @zsoltgyure


    This is a bug which has been fixed in our development branch. The selectall_array() method is not available in all DBI versions.


    You can replace the code from

    by code from

    Once done, connect as admin, go to the debugger interface and retry.

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

  • @Nuxwin


    Thank you I'm done with the changes. Now I get the following error:

    Code
    1. Modules::Domain::restore: Can't locate object method "getInstance" via package "iMSCP::Database" at /var/www/imscp/engine/PerlLib/Modules/Domain.pm line 171, <$fh> line 406.

    Am I doing something wrong?


    Thanks.
    Zsolt Gyure

  • @zsoltgyure


    At top (after line 38), add:


    Perl
    1. use iMSCP::Database;

    Another way: replace the iMSCP::Database->getInstance()->getRawDb() code part by $self->{'_dbh'}


    Then retry.

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

  • @zsoltgyure


    Sorry... There is no getInstance() method in your i-MSCP version. This method has been added in 1.6.x branch.... Well, remove the use iMSCP::Database; statement and do as here: https://github.com/i-MSCP/imsc…4db074e3652e002a781140410 (as in line 162 only).

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

  • Yes now it's working! Thank you!

    You're welcome ;)


    Thread closed.

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