Title: PHP Warning while using WP CLI
Last modified: February 28, 2020

---

# PHP Warning while using WP CLI

 *  Resolved [Kevin Brent](https://wordpress.org/support/users/kevin-brent/)
 * (@kevin-brent)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-warning-while-using-wp-cli/)
 * While using WP CLI I am getting these warnings when running commands. We are 
   using WP v5.3.2, WordFence v7.4.6, and WP CLI v2.4.0 on WPEngine servers.
 *     ```
       PHP Warning:  fopen(/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 325
       Warning: fopen(s/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /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 /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 /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 326
       PHP Warning:  include(/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       Warning: include(/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       PHP Warning:  include(): Failed opening '/wp-content/wflogs/rules.php' for inclusion (include_path='.:/usr/share/php') in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       Warning: include(): Failed opening '/wp-content/wflogs/rules.php' for inclusion (include_path='.:/usr/share/php') in /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 /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 /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 /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 /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 330
       ```
   

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

 *  Thread Starter [Kevin Brent](https://wordpress.org/support/users/kevin-brent/)
 * (@kevin-brent)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-warning-while-using-wp-cli/#post-12492529)
 * I forgot to mention PHP 7.3.15
 *  Plugin Support [wfphil](https://wordpress.org/support/users/wfphil/)
 * (@wfphil)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/php-warning-while-using-wp-cli/#post-12493517)
 * Hi Kevin.
 * WP Engine doesn’t allow the use of the file based storage engine for the firewall
   configuration data so you will need to switch to the MySQLi storage engine as
   outlined below:
 * [https://www.wordfence.com/help/firewall/mysqli-storage-engine/](https://www.wordfence.com/help/firewall/mysqli-storage-engine/)
 * More details here:
 * [https://www.wordfence.com/blog/2019/08/wordfence-now-works-on-wp-engine-and-with-load-balancers/](https://www.wordfence.com/blog/2019/08/wordfence-now-works-on-wp-engine-and-with-load-balancers/)
 *  [WFGerroald](https://wordpress.org/support/users/wfgerald/)
 * (@wfgerald)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/php-warning-while-using-wp-cli/#post-12617464)
 * Hey [@kevin-brent](https://wordpress.org/support/users/kevin-brent/),
 * We haven’t heard back from you in a while, so I’ve gone ahead and marked this
   thread as resolved.
 * Please feel free to open another thread if you’re still having issues with Wordfence.
 * Thanks,
 * Gerroald

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

The topic ‘PHP Warning while using WP CLI’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 3 replies
 * 3 participants
 * Last reply from: [WFGerroald](https://wordpress.org/support/users/wfgerald/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/php-warning-while-using-wp-cli/#post-12617464)
 * Status: resolved