Plugin Support
wfphil
(@wfphil)
Hi @d88pak
If you have manually switched to using the MySQLi storage engine to store the firewall data then see our guide below for preventing PHP errors when using WP-CLI:
https://www.wordfence.com/help/firewall/mysqli-storage-engine/#using-wp-cli-with-the-mysqli-storage-engine
Thread Starter
Deepak
(@d88pak)
Hi @wfphil,
I don’t remember doing this and my wordfence-waf.php doesn’t show any mysqli related setting.
<?php
// Before removing this file, please verify the PHP ini setting auto_prepend_file does not point to this.
if (file_exists(__DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php')) {
define("WFWAF_LOG_PATH", __DIR__.'/wp-content/wflogs/');
include_once __DIR__.'/wp-content/plugins/wordfence/waf/bootstrap.php';
}
I have added the suggested line from the link in my wp-config.php
if( ! defined('WFWAF_STORAGE_ENGINE')) { define('WFWAF_STORAGE_ENGINE', 'mysqli'); }
Howerver, I am getting this new error
Permission denied in phar:///usr/local/bin/wp/vendor/wp-cli/media-command/src/Media_Command.php on line 687
Do you have any suggestions? or can you point me to the right direction?
Thanks!
Plugin Support
wfphil
(@wfphil)
Hi @d88pak
Thank you for the update.
Please remove the line below form your wp-config.php file:
if( ! defined('WFWAF_STORAGE_ENGINE')) { define('WFWAF_STORAGE_ENGINE', 'mysqli'); }
Try using our constant WFWAF_LOG_FILE_MODE and set permissions to 0660:
define('WFWAF_LOG_FILE_MODE', 0660);
https://www.wordfence.com/help/advanced/constants/#web-application-firewall-waf
Thread Starter
Deepak
(@d88pak)
Hi @wfphil ,
Thanks for the update. I have done as you said. So far the previous message disappeared.
It does regenerate some media files, but after few runs it shows this error message.
PHP Warning: chmod(): Operation not permitted in /wp-includes/class-wp-image-editor-imagick.php on line 867
Now I am not sure if this is related to Wordfence in particular or permission issue.
Please suggest if you happen to know about this issue.
Thanks!
-
This reply was modified 1 year ago by
Deepak.
Plugin Support
wfphil
(@wfphil)
Hi @d88pak
That shouldn’t be caused by our plugin and looks like it is a server user ownership issue and your hosting provider can help you to resolve it.