• fshunter

    (@fshunter)


    When trying to install this plugin, I’ve encountered the following error:

    Warning: require_once(/www/wp-content/plugins/../../wp-load.php): failed to open stream: No such file or directory in /www/wp-content/plugins/wp-security-hardening/modules/hooks.php on line 3 Fatal error: require_once(): Failed opening required ‘/www/wp-content/plugins/../../wp-load.php’ (include_path=’.:/usr/share/php’) in /www/wp-content/plugins/wp-security-hardening/modules/hooks.php on line 3

    With the research I’ve done I’m inclined to believe that this error is happening because of the a lack of an htaccess file. Since our site is hosted on NGINX servers and NGINX servers cannot have an htaccess file, does that mean that this plugin won’t work with my site?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @fshunter – based on the error message it looks like the script is not able to load /www/wp-load.php, rather than an nginx issue. Can you please confirm that the file exists via SSH/FTP?

    maspegren

    (@maspegren)

    @wizak Our NGINX server does not have the “www” path, will that be an issue? wp-load.php is in the root, no “www” folder exists.

    @wizak Any update for my response?

    Plugin Author WebProtect.ai

    (@astrasecuritysuite)

    Hi @maspegren – the error seems to be because of the following code in the plugin:

    require_once(dirname(__FILE__, 3) . "/../../wp-load.php");

    It looks like the __FILE__ constant on your server returns a path which contains www. This seems to be because of how your server is configured. This thread seems to explain the problem: https://www.php.net/manual/en/language.constants.predefined.php#125170

    Let me also consult with our team to see if we can update the code to work without the __FILE__ constant.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Does this Plugin work with NGINX?’ is closed to new replies.