Plesk Migrator is inaccessible on Plesk Onyx: unexpected 'array' (T_ARRAY), expecting variable (T_VARIABLE)

Comments

1 comment

  • Avatar
    Jon Doe

    "…should be carried out to a modern, supported system" unfortunately is not always possible. We have three Plesk Obisidian 18.0.28 with domains the customer doesn't want to update, so those have to use ancient PHP versions and we cannot update Debian and Plesk even if we wanted to. Now, we want to migrate the contents from one server to another, and this fails.

    Workaround is to make the code compatible with PHP 7.3 (/opt/psa/bin/sw-engine-pleskrun -v). It was sufficient to edit the following files.

    # diff /opt/psa/admin/plib/modules/panel-migrator/vendor/plesk/migration-lib-code/src/Common/SessionDirectory.php.org /opt/psa/admin/plib/modules/panel-migrator/vendor/plesk/migration-lib-code/src/Common/SessionDirectory.php
    10,13c10
    <     private static array $_instances = [];
    ---
    >     private static $_instances = [];
    15,18c12
    <     private string $_path;
    ---
    >     private $_path;
    20,23c14
    <     private string $_id;
    ---
    >     private $_id;


    /opt/psa/admin/plib/modules/panel-migrator/vendor/plesk/migration-lib-code/src/Common/SessionFiles.php

    protected SessionDirectory $_session;
    -->
    protected $_session;


    Others might be necessary in some cases but this didn't seem to be necessary for us:
    grep SessionDirectory /opt/psa/admin/plib/modules/panel-migrator -R -l

    Afterwards, PMM would transfer content but had problems restoring the Hosting Settings ("backup file is not valid or corrupted") due to unknown reasons. At least, it doesn't look like this had the same cause. Just manually compare the settings and fix accordingly.
     

    0

Please sign in to leave a comment.

Have more questions? Submit a request