• Resolved Erik Harris

    (@eharris)


    AIOPS uses PHP features that have been deprecated since version 5.6, and therefore produced PHP errors on any site that isn’t using a 9-year-old version of PHP. Are there any plans to make this extension compliant with PHP 8.x? Of the errors I list below (from a PHP Compatibility Checker), the first one is also present in PHP 7.0 and 7.1, and all of them are present in PHP 7.2-8.0:

    PHP 8.0 incompatibilities:
    
    FILE: classes/wp-security-audit-event-handler.php
    
    FOUND 1 ERRORS AND 0 WARNINGS AFFECTING 1 LINES
    
    57 | ERROR | Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter "$username" was changed on line 55.
    
    FILE: includes/simba-tfa/providers/totp/loader.php
    
    FOUND 24 ERRORS AND 0 WARNINGS AFFECTING 3 LINES
    
    877 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    877 | ERROR | Function mcrypt_get_iv_size() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    877 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
    877 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
    877 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    877 | ERROR | Function mcrypt_get_iv_size() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    877 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
    877 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
    889 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    889 | ERROR | Function mcrypt_encrypt() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    889 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
    889 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
    889 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    889 | ERROR | Function mcrypt_encrypt() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    889 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
    889 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
    897 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    897 | ERROR | Function mcrypt_decrypt() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    897 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2
    897 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2
    897 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    897 | ERROR | Function mcrypt_decrypt() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
    897 | ERROR | The constant "MCRYPT_RIJNDAEL_128" is deprecated since PHP 7.1 and removed since PHP 7.2 897 | ERROR | The constant "MCRYPT_MODE_CBC" is deprecated since PHP 7.1 and removed since PHP 7.2 FILE: includes/simba-tfa/simba-tfa.php FOUND 6 ERRORS AND 0 WARNINGS AFFECTING 1 LINES 664 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    664 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    664 | ERROR | The constant "MCRYPT_RAND" is deprecated since PHP 7.1 and removed since PHP 7.2
    664 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
    664 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and removed since PHP 7.2; Use random_bytes() or OpenSSL instead 664 | ERROR | The constant "MCRYPT_RAND" is deprecated since PHP 7.1 and removed since PHP 7.2
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support hjogiupdraftplus

    (@hjogiupdraftplus)

    Hi @eharris

    The code is openssl_encrypt is being used for php7.1+

    It seems mcrypt_get_iv_size function is still exists though it has been removed.

    line 877 if (function_exists('mcrypt_get_iv_size')) {

    Do you have the latest version of AIOS 5.1.8 ?

    Though I will cross check in more detail and get back to you.

    Regards

    Plugin Support aporter

    (@aporter)

    Hi,

    AIOS is fully compatible with PHP 8+.

    Using a static code analyser will only tell you what code exists, not what code runs on each PHP version.

    Best Wishes,

    Ashley

    Thread Starter Erik Harris

    (@eharris)

    @hjogiupdraftplus – Yes, I should’ve specified that I’m using AIOS 5.1.8 on WordPress 6.2. Sorry for the omission

    @aporter – Thanks, that’s good to know! I haven’t experienced any problems with AIOS, but it’s the only one of my plugins that shows up with errors under newer versions of PHP. I didn’t realize that PHP compatibility checkers don’t parse the code to look for conditional commands that execute lines only if certain versions of PHP are in use.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Are there plans to update AIOS for more recent PHP versions?’ is closed to new replies.