• Resolved tjldesigns

    (@tjldesigns)


    Hello,

    This morning we had an error 500 all of a sudden on our site down to the following Wordfence error:

    PHP Fatal error:  Class wfGlobalCookieRedactor cannot extend interface wfWAFRequestInterface in /home/mauriceturnorgar/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/request.php on line 82

    Our server team spotted this and simply changed the PHP version from 8.1 to 7.4 to see what would happen, and the site came back, they then put it back on 8.1 and it’s stayed up, so we just wanted to check does anyone know what would have caused this so we can avoid this happening again, just as it took the site down for a few hours as a result.

    Thanks so much in advance,
    Tonya

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @tjldesigns, thanks for getting in touch.

    This was an unusual one as wfGlobalCookieRedactor extends wfCookieRedactor rather than wfWAFRequestInterface. There also weren’t any changes to that class in our latest release.

    On the face of it, this sounds like a PHP OPcache issue, especially since changing PHP versions seemed to help. We’ve seen a few similar issues over the years, generally on sites running PHP-FPM. Restarting PHP-FPM without changing versions may also fix it, if that’s the case.

    For this reason, we’re not certain of a way to prevent the issues, aside from restarting after updating plugins/themes or WordPress core. Decreasing how long child processes last may help too.

    In the WordPress 6.2 changes, we see it includes OPcache invalidation in the new move_dir() function that’s used during plugin updates, which may help prevent issues of this nature if it is related.

    Thanks,
    Peter.

    Thread Starter tjldesigns

    (@tjldesigns)

    Thanks so much for your reply Peter, that is really helpful, and fingers crossed it was just a one off, but I will relay your feedback to the team so they are aware of the potential causes in case of any future issues :).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Fatal error: Class wfGlobalCookieRedactor cannot extend interface…’ is closed to new replies.