• Resolved Jeff C

    (@12steprecovery)


    Eli’s PHP Compatibility Scanner shows me that there’s a PHP error

    #!/usr/bin/env php

    FILE: ...y/vendor/siteground/googleauthenticator/PHPGangsta/GoogleAuthenticator.php
    --------------------------------------------------------------------------------
    FOUND 3 ERRORS AFFECTING 1 LINE
    --------------------------------------------------------------------------------
    37 | ERROR | Extension 'mcrypt' is deprecated since PHP 7.1 and removed since
    | | PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available
    | | instead
    37 | ERROR | Function mcrypt_create_iv() is deprecated since PHP 7.1 and
    | | removed since PHP 7.2; Use random_bytes() or OpenSSL instead
    37 | ERROR | The constant "MCRYPT_DEV_URANDOM" is deprecated since PHP 7.1 and
    | | removed since PHP 7.2
    --------------------------------------------------------------------------------

    Time: 460ms; Memory: 16MB

    There’s a fork at https://github.com/Coderberg/GoogleAuthenticator that updates it

    • This topic was modified 3 months ago by Jeff C.
Viewing 1 replies (of 1 total)
  • Plugin Support stefanstefanov

    (@stefanstefanov)

    Hello @12steprecovery

    You can safely disregard the compatibility scanner warnings. These reported “errors” are false positives and do not reflect an actual issue within the library’s implementation.

    The library is designed defensively and checks for the existence of specific functions—such as function_exists('mcrypt_create_iv')—before attempting to execute any related code. Since the mcrypt extension has been removed as of PHP 7.2 and is no longer available in PHP 8+, this conditional check simply evaluates to false in those environments. As a result, the corresponding code block is safely bypassed, and no deprecated or unsupported functionality is executed.

    I can assure you that the two-factor authentication (2FA) implementation operates reliably with Google Authenticator on PHP 8 and later versions. There are no functional issues affecting performance, security, or compatibility.

    Regards,

    Stefan Stefanov

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.