wfmatt
Forum Replies Created
-
Hi tbenoit,
We haven’t tested the Firewall installation using with CloudLinux and mod_lsapi, but I’ve added it to our list of environments to test for a future release. Based on it’s documentation it looks like mod_lsapi supports the
php_value
directive which you should be able to include in your .htaccess if you’d like to attempt to install the Firewall manually.You can try adding the below code with the path shown in the ‘Alternate method’ section of the Firewall installation page to your .htaccess file:
<IfModule lsapi_module> php_value auto_prepend_file '/path/to/wordfence-waf.php' </IfModule>
With LiteSpeed, the .htaccess file took around 5 minutes to take effect when changes were made, so you may experience the same. If you run into any issues, remove the above code from your .htaccess.
https://docs.cloudlinux.com/index.html?apache_mod_lsapi.html
Thanks,
MattThat is indeed strange, and you are still seeing the same ‘php_value not allowed here’ error in the error log:
/is/htdocs/wp12409552_J2H9ZAB6A9/www/bcw/.htaccess: php_value not allowed here
Can you try commenting or removing the WordPress mod_rewrite code temporarily as a precaution?
Hi TheCraig,
Are you getting this notice each time you run the scan?
Thanks,
MattHi sigiberlin,
In your .htaccess file, can you remove any text between these lines:
# Wordfence WAF
…
# END Wordfence WAFAnd see if that brings the site back up?
Hi Jo,
Can you check to see if there are errors in the JavaScript console? You can refer to this article if you don’t know how to open it:
https://docs.wordfence.com/en/Open_the_JavaScript_console_for_troubleshooting_plugins
Hi Jason,
Is /var/www/html/wp-content/plugins/wordfence/ the full path to the Wordfence plugin on your server?
@infinitewp We do check to see if the request method is GET before creating a cache file. It doesn’t matter whether the request body was URL encoded data or base64 encoded serialized data. The IWP client plugin will use whatever is in
php://input
, so you use GET, POST, PUT, etc as the HTTP method and still get a response from IWP back, which could be why these are being cached. I’m not thrilled about anyone being able to cache a response back from the IWP client plugin anyways, which is basically what you can do here. If you added in between lines 91 and 92if ($_SERVER['REQUEST_METHOD'] != 'POST') return;
in https://plugins.svn.www.ads-software.com/iwp-client/tags/1.3.15/init.php that should prevent a GET request with the IWPHEADER response from being cached.I also looked at a few of the sites whose response from IWP was indexed by Google. The site 2-cent.com was amongst that list, and in the cached response it shows a list of installed plugins. Wordfence isn’t on that list. Here’s the decoded and unserialized response:
Wordfence is also not on the list of installed plugins for the site that Bob picked randomly either.
Hi Scott,
I’m one of the Wordfence developers and have been looking into the issue your having. I’ve haven’t been able to replicate the exact behaviour, but I have found scenarios where I can get the IWP client response to be cached. If the request uses the GET method with a message body, the InfiniteWP client plugin will still use and process it since it checks
php://input
which is available for any HTTP method. Wordfence does check that the request method is GET before caching (see line 88: https://plugins.svn.www.ads-software.com/wordfence/tags/6.0.11/lib/wfCache.php). I looked at the IWP admin code, and theirdoCall
method which from what I can see is the only way they call the IWP client should only send requests using POST. It’s possible one of their add-ons is making that call, but I don’t have that code available to troubleshoot it.Since I don’t have a direct solution to your problem, I can give you a workaround to use that hopefully will stop bringing down your sites in the meantime. The IWP admin offers a way to specify the /wp-admin/ as the URL to connect to when it talks to the IWP client plugin (Edit Site Details > Advanced > Connect Using). The Wordfence cache does not cache anything in /wp-admin/ so hopefully that works as an alternative.
– Matt