• Resolved deeholzman

    (@deeholzman)


    I ran Updraft Plugin files through PHPCS using PHPCompatibility checker and it generated the following warnings and errors. We’re trying to upgrade to PHP 8 on a Dreamhost server and getting general Error messages saying plugin/theme files may be incompatible with PHP8 – would any of these warnings cause this:

    [1mFILE: /wp-content/plugins/updraftplus/includes/updraft-restorer-skin.php[0m
    
    [1mFOUND 1 ERROR AFFECTING 1 LINE[0m
    
    40 | [31mERROR[0m | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed to a
    
    | | parameter, but will instead provide the current value. The parameter "$string" was changed on line 36.
    
    [1mFILE: /wp-content/plugins/updraftplus/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP/Stream.php[0m
    
    [1mFOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE[0m
    
    200 | [33mWARNING[0m | Global with anything other than bare variables is discouraged since PHP 7.0. Found ${$host}
    
    [1mFILE: /wp-content/plugins/updraftplus/vendor/phpseclib/phpseclib/phpseclib/Crypt/Random.php[0m
    
    [1mFOUND 5 ERRORS AFFECTING 2 LINES[0m
    
    77 | [31mERROR[0m | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL
    | | instead
    77 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once
    | | available instead
    119 | [31mERROR[0m | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL
    | | instead
    119 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once
    | | available instead
    
    119 | [31mERROR[0m | The constant "MCRYPT_DEV_URANDOM" is deprecated since PHP 7.1 and removed since PHP 7.2
    
    [1mFILE: /wp-content/plugins/updraftplus/vendor/phpseclib/phpseclib/phpseclib/Crypt/Base.php[0m
    
    [1mFOUND 44 ERRORS AND 2 WARNINGS AFFECTING 26 LINES[0m
    
    651 | [33mWARNING[0m | Since PHP 7.0, functions inspecting arguments, like func_get_args(), no longer report the original value as passed
    | | to a parameter, but will instead provide the current value. The parameter "$method" was used, and possibly changed
    | | (by reference), on line 649.
    830 | [31mERROR[0m | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    830 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    863 | [31mERROR[0m | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    863 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    866 | [31mERROR[0m | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    866 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    871 | [31mERROR[0m | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    871 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    880 | [31mERROR[0m | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    880 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    892 | [31mERROR[0m | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    892 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    895 | [31mERROR[0m | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    895 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1147 | [31mERROR[0m | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1147 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1175 | [31mERROR[0m | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1175 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1180 | [31mERROR[0m | Function mcrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1180 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1191 | [31mERROR[0m | Function mdecrypt_generic() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1194 | [31mERROR[0m | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1194 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1659 | [31mERROR[0m | Function mcrypt_list_algorithms() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1659 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1741 | [31mERROR[0m | Function mcrypt_module_close() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1741 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1742 | [31mERROR[0m | Function mcrypt_module_close() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1742 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1747 | [31mERROR[0m | Function mcrypt_module_close() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1747 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1861 | [31mERROR[0m | The constant "MCRYPT_MODE_ECB" is deprecated since PHP 7.1 and removed since PHP 7.2
    1862 | [31mERROR[0m | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
    1864 | [31mERROR[0m | The constant "MCRYPT_MODE_NOFB" is deprecated since PHP 7.1 and removed since PHP 7.2
    1865 | [31mERROR[0m | The constant "MCRYPT_MODE_STREAM" is deprecated since PHP 7.1 and removed since PHP 7.2
    1868 | [31mERROR[0m | Function mcrypt_module_open() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1868 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1869 | [31mERROR[0m | Function mcrypt_module_open() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1869 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1875 | [31mERROR[0m | Function mcrypt_module_open() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1875 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    1875 | [31mERROR[0m | The constant "MCRYPT_MODE_ECB" is deprecated since PHP 7.1 and removed since PHP 7.2
    1880 | [31mERROR[0m | Function mcrypt_generic_init() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    1880 | [31mERROR[0m | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt
    | | once available instead
    
    2573 | [33mWARNING[0m | Function create_function() is deprecated since PHP 7.2; Use an anonymous function instead
    
    [1mFILE: /users/deeholzman/sites/TComm_911/wp-content/plugins/updraftplus/vendor/phpseclib/phpseclib/phpseclib/bootstrap.php[0m
    
    [1mFOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE[0m
    
    12 | [33mWARNING[0m | INI directive 'mbstring.func_overload' is deprecated since PHP 7.2
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor DNutbourne

    (@dnutbourne)

    Hi,

    The function and extension mentioned in these errors/warnings is only used if available (UpdraftPlus checks for the extension first).

    As such, in PHP 8, the function will never be called and the plugin will still be compatible. The functions are kept to allow for compatibility with older versions of PHP.

    Best Wishes,
    Dee

    Thread Starter deeholzman

    (@deeholzman)

    Thanks for your reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘UpdraftPlus Compatibility Check with PHP 8 and 8.1’ is closed to new replies.