• We are working on a bitnami server using nginx
    after migrating to new server we getting errors:

    PHP Warning:  fopen(/opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 325
    Warning: fopen(/opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 325
    PHP Warning:  flock() expects parameter 1 to be resource, bool given in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 326
    Warning: flock() expects parameter 1 to be resource, bool given in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 326
    PHP Warning:  include(/opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
    Warning: include(/opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
    PHP Warning:  include(): Failed opening '/opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/rules.php' for inclusion (include_path='.:/opt/bitnami/php/lib/php') in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
    Warning: include(): Failed opening '/opt/bitnami/apps/wordpress/htdocs/wp-content/wflogs/rules.php' for inclusion (include_path='.:/opt/bitnami/php/lib/php') in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
    PHP Warning:  flock() expects parameter 1 to be resource, bool given in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 329
    Warning: flock() expects parameter 1 to be resource, bool given in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 329
    PHP Warning:  fclose() expects parameter 1 to be resource, bool given in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 330
    Warning: fclose() expects parameter 1 to be resource, bool given in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 330

    We try several times to re-install the plugin same problem

    any advice?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support WFAdam

    (@wfadam)

    Hello @101sam and thanks for reaching out to us!

    It looks like you might be using MySQLi storage engine, correct? It seems it cannot find the wflogs folder which is normal in a MySQLi build but the code for it to work properly might not be in place after the migration.

    Can you send a diagnostic report to wftest @ wordfence . com? You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    Thanks!

    Thread Starter Shmuel Maruani (Sam)

    (@101sam)

    Sent ??

    Thread Starter Shmuel Maruani (Sam)

    (@101sam)

    We had to disable the plugin – it creates a lock for every single user who accesses the website.

    Plugin Support WFAdam

    (@wfadam)

    That might be happening because your Wordfence is looking for the WAF rules and cant find it so it was protecting your site.

    https://www.wordfence.com/help/firewall/mysqli-storage-engine/

    You will need to add this to your wordfence-waf.php:
    define('WFWAF_STORAGE_ENGINE', 'mysqli');

    For Example:

    <?php
    // Before removing this file, please verify the PHP ini setting <code>auto_prepend_file</code> does not point to this.
    define('WFWAF_STORAGE_ENGINE', 'mysqli');
     
    if (file_exists('<path to wordpress>/wp-content/plugins/wordfence/waf/bootstrap.php')) {
        define("WFWAF_LOG_PATH", '<path to wordpress>/wp-content/wflogs/');
        include_once '<path to wordpress>/wp-content/plugins/wordfence/waf/bootstrap.php';
    }

    You will need to remove the Wordfence “wflogs” directory located below:
    ~/wp-content/wflogs

    I recommend doing a backup before changing any of these settings.

    Let me know if this resolves your issue!

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘failed to open stream: No such file or directory’ is closed to new replies.