• I keep receiving emails from my WordPress site saying that it caught an error with Wordfence Security (despite having updated WordPress and reinstalled WordFence multiple times). Looked on the forum for similar issues but offered solutions didn’t help. Have difficulty interpreting the error. Site is otherwise functional. Details below:


    Windows 10
    WordPress version 5.5.3
    Current theme: Twenty Nineteen (version 1.7) Current plugin: Wordfence Security (version 7.4.12) PHP version 7.4.8

    Error Details
    =============
    An error of type E_ERROR was caused in line 22 of the file /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/whitelist.php. Error message: Uncaught Error: Class ‘WordfenceLS\Model_IP’ not found in /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/whitelist.php:22
    Stack trace:
    #0 /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/wordfencels.php(356): WordfenceLS\Controller_Whitelist->is_whitelisted(‘108.162.241.31’)
    #1 /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-includes/class-wp-hook.php(287): WordfenceLS\Controller_WordfenceLS->_authenticate(Object(WP_Error), ”, ‘remi-theriault’)
    #2 /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-includes/plugin.php(206): WP_Hook->apply_filters(Object(WP_Error), Array)
    #3 /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-includes/pluggable.php(549): apply_filters(‘authenticate’, NULL, ”, ‘remi-theriault’)
    #4 /home/vol5_4/epizy.com/epiz_24445062/remi-theriault.com/htdocs/wp-includes/user.ph

    • This topic was modified 3 years, 5 months ago by rempsyc.
Viewing 11 replies - 16 through 26 (of 26 total)
  • Thread Starter rempsyc

    (@rempsyc)

    Update: regarding the message about cURL error 35, my host said the following:

    This is caused by the way our servers work. If you try to connect from your website to your website, the connection doesn’t go through Cloudflare, it goes straight to our server.

    So could this be related to the E_ERROR/line 22?

    In the meanwhile, I have turned Automatic HTTPS Rewrites OFF. I’m now getting a new Wordfence message on WordPress (no idea if it’s related):

    The Wordfence Web Application Firewall needs a configuration update. It is not currently in extended protection mode but was configured to use an older version of PHP and may have become deactivated when PHP was updated. You may perform the configuration update automatically by clicking here or use the “Optimize the Wordfence Firewall” button on the Firewall Options page.

    I did perform the configuration update automatically by clicking on the button. I also turned Enable 301 .htaccess redirect ON, and Enable WordPress 301 redirect OFF. However, then I could see a message saying that “No 301 redirect is set. Enable the WordPress 301 redirect in the settings to get a 301 permanent redirect.” So I turned Enable WordPress 301 redirect back ON. Therefore both are ON right now (is that bad?).

    I also saw the following option in the Settings menu: “Fire mixed content fixer with different method”. Hovering over the question mark produces the following message:

    If this option is set to true, the mixed content fixer will fire on the init hook instead of the template_redirect hook. Only use this option when you experience problems with the mixed content fixer.

    I believe I actually am experiencing problems with the mixed content fixer, so I just turned this ON too. Finally, I noticed another option in the Settings: “Mixed content fixer”:

    In most cases you need to leave this enabled, to prevent mixed content issues on your site.

    I did not touch this one (left it ON).

    Finally, after making those changes, I just received yet another email with the same error (~1h after posting).

    • This reply was modified 3 years, 4 months ago by rempsyc.
    • This reply was modified 3 years, 4 months ago by rempsyc.
    • This reply was modified 3 years, 4 months ago by rempsyc.
    Plugin Support wfpeter

    (@wfpeter)

    Hi @rempsyc, thanks for all of that detail of what you’ve tried and responses you’ve had so far.

    We’d normally recommend pausing Cloudflare to see if the site functions properly without it, to at least narrow down the number of issues coming up at once, but if you’re depending on Cloudflare for SSL to work, you might not be able to.

    Your host stated they won’t enable IPv6 support because their servers don’t use it, and Cloudflare can’t connect to us with IPv6 addresses. However, Cloudflare can pass an IPv6 address in the CF-Connecting-IP header, so PHP won’t be able to process that when Wordfence needs it to. Cloudflare doesn’t let you turn off IPv6, so this might continue to be an issue going forward if the host won’t enable it.

    Your host also said this is caused by the way our servers work. If you try the connection from your website back to your website, the connection doesn’t go through Cloudflare, it goes straight to Wordfence servers. That might mean that the cURL error is from the site trying to connect to itself directly, but with an invalid SSL certificate on the site. If the site would normally connect to itself with plain http, and it’s trying https instead (because of the really-simple-ssl plugin?), that could cause the cURL problem you’re seeing if the site doesn’t have its own valid certificate.

    When the file containing the “missing” class is present but this issue occurs, it’s usually a conflict with another plugin’s autoloader, but we don’t see any in your installed plugins that look like the cause. It could be a plugin that loads some WP core files out of order, or calls a hook earlier than it’s intended to be called. Another possibility might be if the host or a custom Linux cron job is running PHP on the command line in an unusual way. You could try disabling all plugins except for Wordfence, then reenabling plugins one-by-one to see if there’s an identifiable troublemaker.

    Thanks,

    Peter.

    Thread Starter rempsyc

    (@rempsyc)

    We’d normally recommend pausing Cloudflare to see if the site functions properly without it, to at least narrow down the number of issues coming up at once, but if you’re depending on Cloudflare for SSL to work, you might not be able to.

    Yes, my site depends on Cloudflare for SSL to work, so I’m not really able to disable it.

    Your host stated they won’t enable IPv6 support because their servers don’t use it, and Cloudflare can’t connect to us with IPv6 addresses. However, Cloudflare can pass an IPv6 address in the CF-Connecting-IP header, so PHP won’t be able to process that when Wordfence needs it to. Cloudflare doesn’t let you turn off IPv6, so this might continue to be an issue going forward if the host won’t enable it.

    Just to clarify, in my earlier post, I said:

    IPv6 mode is disabled

    If it is disabled, it means Cloudflare doesn’t let me turn it ON. So that would not be the issue.

    Your host also said this is caused by the way our servers work. If you try the connection from your website back to your website, the connection doesn’t go through Cloudflare, it goes straight to Wordfence servers. That might mean that the cURL error is from the site trying to connect to itself directly, but with an invalid SSL certificate on the site. If the site would normally connect to itself with plain http, and it’s trying https instead (because of the really-simple-ssl plugin?), that could cause the cURL problem you’re seeing if the site doesn’t have its own valid certificate.

    Ok, I can see that. But nothing I can do here, right?

    When the file containing the “missing” class is present but this issue occurs, it’s usually a conflict with another plugin’s autoloader, but we don’t see any in your installed plugins that look like the cause. It could be a plugin that loads some WP core files out of order, or calls a hook earlier than it’s intended to be called. Another possibility might be if the host or a custom Linux cron job is running PHP on the command line in an unusual way. You could try disabling all plugins except for Wordfence, then reenabling plugins one-by-one to see if there’s an identifiable troublemaker.

    Ok, I’ll try disabling all plugins and reenabling them one by one to see. Thanks.

    Note: Received the email again yesterday afternoon.

    • This reply was modified 3 years, 4 months ago by rempsyc.
    Thread Starter rempsyc

    (@rempsyc)

    Hi @wfpeter as you know I have disabled all my plugins except Wordfence 2 days ago and I just received the same email again about the E_ERROR on line 22. This suggests that the other plugins are not at fault. What would be the next steps then?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rempsyc,

    The IPv6 setting at Cloudflare is unlikely to be off, even if the control is disabled. On ours, it’s disabled, but you can see the word “ON” on the switch, and the help link says that you cannot turn it off. When we visit your site, Cloudflare does give us IPv6 addresses back.

    The host needs to solve the issue where the server can’t connect back to itself while Cloudflare is enabled since this is breaking WordPress cron jobs to update plugins etc., not just Wordfence.

    The error regarding \WordfenceLS\Model_IP looks to be related to IPv6 support being disabled in PHP. You could try to discover what’s happening in the access logs at the timestamp this the error message occurs.

    Thanks,

    Peter.

    Thread Starter rempsyc

    (@rempsyc)

    Oh ok, I see what you mean. I’ll return to my host with this information. Thanks.

    Plugin Support wfpeter

    (@wfpeter)

    Thanks @rempsyc, hopefully they can assist in resolving this case for you.

    Thread Starter rempsyc

    (@rempsyc)

    Right now, we are trying another approach. Instead of using Cloudflare directly, we are attempting to use my host’s cPanel Cloudflare integration to see if it resolves the issue. Will let you know if I receive the error email again.

    Thread Starter rempsyc

    (@rempsyc)

    Update: Using my host’s cPanel Cloudflare integration does not resolve the issue. Still receiving the emails. Thinking about giving up at this point since the site is otherwise functional. Would it be concerning to not address it (i.e., is it indicative of potentially larger problems)? What would you recommend next?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @rempsyc thank-you for the further information.

    Our development team are still not sure of the cause of that error. We test a huge amount of different server/hosting environments with Wordfence to ensure we have good knowledge for fixing problems that arise for all sorts of WordPress setups but this is proving difficult even with the help you’ve been kindly giving us. As long as the file is present, it means that somehow the auto-loader isn’t working.

    If it’s definitely not caused by another plugin, it could be caused by the same files being accessible by multiple paths on your server. We can’t say for sure whether it’s a sign of a bigger problem. It’s definitely worth checking if there is a hit in the site’s access log at the same time this message occurs, or if it’s consistently at the same time daily. There could be a cron job that might be running PHP, either by wget/cURL or directly on the command line.

    WordPress limits how often it will send the fatal error email, so it’s possible it’s happening more often too.

    Issues around Cloudflare and SSL are your host’s responsibility, but if you want to use Cloudflare and the host won’t help here, we would reluctantly suggest the possibility that another host may be able to provide you with the environment you wish to use going forward.

    Thanks,

    Peter.

    Thread Starter rempsyc

    (@rempsyc)

    Alright, thanks for your answer. I guess I can’t do much more for now as I transition to a new host. So I think I’ll give up on this issue for the moment as it is not breaking my site and, in my understanding, does not create any imminent security risks. Thanks.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘“An error of type E_ERROR was caused in line 22 of the file “’ is closed to new replies.