• Hello,

    I’m getting this error in the debug logs. I’m assuming its incompatibility with PHP8.x?

     * PHP Warning:? Undefined array key "SCRIPT_FILENAME" in /home/xxx/public_html/assets/plugins/better-wp-security/core/modules/hide-backend/class-itsec-hide-backend.php on line 95
    * PHP Deprecated:? substr(): Passing null to parameter #1 ($string) of type string is deprecated in /home/xxx/public_html/assets/plugins/better-wp-security/core/modules/hide-backend/class-itsec-hide-backend.php on line 95
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support chandelierrr

    (@shanedelierrr)

    Hi @mmubashar,

    Glad you reached out!

    Could you please share which PHP version and plugin version you’re using? I’d like to replicate this on a test site, so that I can create an internal tracking report for this.

    If you have additional replication steps to trigger those errors, please share it here, too.

    Looking forward to your response.

    Thread Starter mmubashar

    (@mmubashar)

    Hi there,

    I’m using PHP 8.1.3 with plugin version 9.3.6

    It seems to be happening on every page reload, thrown in the WP_Debug

    Hi @mmubashar,

    If for whatever reason the web server/PHP does not add the SCRIPT_FILENAME entry to the PHP $_SERVER global variable (or it is programmatically removed) AND the SolSec plugin Hide Backend module is enabled, this PHP warning will occur on every request.

    As a test please create a new .php file (my_phpinfo.php) with the following contents:

    <?php

    phpinfo( INFO_VARIABLES );

    ?>

    Then upload it to the root folder of the WordPress install and simply run it:

    https://www.yourdomain.com/my_phpinfo.php.

    Finally check for the $_SERVER[‘SCRIPT_FILENAME’] entry in the resulting output.

    If the entry exists there is always the possibility that it is programmatically removed by some plugin (or custom) code.

    If this is the case temporarily disabling all other plugins (and custom code) should fix the PHP warning.

    Don’t forget to remove the my_phpinfo.php test file afterwards ??

    Thread Starter mmubashar

    (@mmubashar)

    @nlpro Yes, it does show indeed in the phpinfo. So it’s safe to say this is being removed by some plugin? I’ll disable plugins and see which one is being the bad boy. Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.