• My site went down unexpectedly earlier today and after a bit of troubleshooting it transpired the mysql PHP extensions had inadvertently been deactivated.

    I reactivated nd_mysqli in cPanel but the site still didn’t work. Using mysqli everything WordPress related works fine.

    Checking error logs when nd_mysqli is activated, nothing happens and it records the following errors on the logs:

    [03-Feb-2023 10:38:43 UTC] PHP Warning: mysqli_query(): (HY000/2006): MySQL server has gone away in XXX

    [03-Feb-2023 10:38:43 UTC] WordPress database error MySQL server has gone away for query SELECT option_value FROM XXXX WHERE option_name = ‘health-check-current-theme’ LIMIT 1 made by require(‘wp-blog-header.php’)

    Of which there are loads because it is every single call to the database that is affected.

    I can keep my WordPress site running using mysqli but I have other custom apps which need to use nd_mysqli in order to access mysqli::getresult() etc. These all run fine with nd_mysqli activated.

    I’m running 6.1.1 which I have reinstalled. Everything was working fine beforehand and I have made no changes to plugins etc in the past few days. My host has not been very helpful beyond suggesting I rewrite the wordpress core to fix the problem(!). Can anyone suggest where to look for the issue or things to check?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • nd_mysqli is supplied by Cloudlinux, which seems to be the distro your host is using.

    What versions of PHP and MySQL are you running? And are you running libmysqlclient or mysqlnd?

    (It would help tremendously if you could actually run something like phpinfo to check the live config, rather than just taking what’s displayed in your control panel.)

    Thread Starter pullbuoysteve

    (@pullbuoysteve)

    Hi George

    Yes cloudlinux as you say, with PHP v 7.4.33 and MySQL 5.7.40-cll-lve – MySQL Community Server – (GPL)

    The server is running mysqlnd not libmysqlclient

    This is the configuration with nd_mysqli enabled – this doesn’t work with wordpress but other things work fine.

    This is the configuration with mysqli enabled – this does work with WordPress (but then other stuff breaks as there are functions missing)

    Thanks for your help

    Thread Starter pullbuoysteve

    (@pullbuoysteve)

    I couldn’t fix whatever the problem was and my host was not helping at all so I gave up and rewrote the custom apps to use PDO instead of mysqli. So the immediate problem is solved, but I still don’t know what the issue was.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress not working with nd_mysqli’ is closed to new replies.