• Resolved siteadvice

    (@siteadvice)


    I’ve got several sites running the latest version of WordPress and Wordfence on the same server and when I use MultiPHP manager to upgrade from PHP 7.3 to 7.4 the site begins to return 403 errors and the error_log shows the error below.

    Our server uses Litespeed and I can see that other people have reported the same issue. It has been suggested that the MariaDB database is responsible but I haven’t seen anyone else specifically reporting that this is caused by a change in PHP version. With PHP 7.3, everything runs fine and there is no such error.

    I have another server running a very similar configuration of Litespeed, WordPress and Wordfence and PHP 7.4 works fine. No nasty 403 errors there!

    Based on your previous experience of these errors, I wondered if you would be kind enough to recommend what I could tell my technical support team to help solve this problem?

    Here’s the error I am seeing (below).

    Thanks in advance for any advice you can give.

    [24-Oct-2022 08:43:09 UTC] WordPress database error Commands out of sync; you can't run this command now for query SELECT *, CASE 
    WHEN <code>type</code> = 3 THEN 0
    WHEN <code>type</code> = 4 THEN 1
    WHEN <code>type</code> = 7 THEN 2
    WHEN <code>type</code> = 6 THEN 3
    WHEN <code>type</code> = 5 THEN 4
    WHEN <code>type</code> = 9 THEN 5
    WHEN <code>type</code> = 8 THEN 6
    WHEN <code>type</code> = 2 THEN 7
    WHEN <code>type</code> = 1 THEN 8
    ELSE 9999
    END AS <code>typeSort</code>, CASE 
    WHEN <code>type</code> = 3 THEN <code>parameters</code>
    WHEN <code>type</code> = 4 THEN <code>parameters</code>
    WHEN <code>type</code> = 1 THEN <code>IP</code>
    WHEN <code>type</code> = 9 THEN <code>IP</code>
    WHEN <code>type</code> = 5 THEN <code>IP</code>
    WHEN <code>type</code> = 6 THEN <code>IP</code>
    WHEN <code>type</code> = 7 THEN <code>IP</code>
    WHEN <code>type</code> = 2 THEN <code>IP</code>
    WHEN <code>type</code> = 8 THEN <code>IP</code>
    ELSE 9999
    END AS <code>detailSort</code>
     FROM <code>wp_wfblocks7</code> WHERE <code>type</code> IN (7) AND (<code>expiration</code> = 0 OR <code>expiration</code> > UNIX_TIMESTAMP()) ORDER BY <code>typeSort</code> ASC, <code>id</code> DESC made by wfShutdownRegistry->handleShutdown, wfShutdownFunction->invoke, wfWAFIPBlocksController::synchronizeConfigSettings, wfBlock::lockouts, wfBlock::allBlocks
Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @siteadvice, thanks for your detailed message.

    I’ve not seen this come up specifically with a PHP update before, but have seen this on various sites in the past almost always running Litespeed. However, the exact error appears with other plugins too in error logs we’ve been sent from sites seeing experiencing it.

    That said, Litespeed runs fine for plenty of sites also running Wordfence so your host will need to troubleshoot why this is happening. We believe that the issue is related to the database itself where MySQL/MariaDB is stopping, reconnecting and leaving the connection in a state that somehow causes this query error to appear.

    We usually request that you or your host check the database server logs and other logs for the website(s) on the server such as syslog etc. to see what else is going on with the server at the timestamp of these issues. I would expect the database to be unavailable temporarily, either because it is restarting or has crashed.

    Thanks,

    Peter.

Viewing 1 replies (of 1 total)
  • The topic ‘403 error running PHP 7.4’ is closed to new replies.