Title: PHP 8 Error
Last modified: November 19, 2021

---

# PHP 8 Error

 *  [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/)
 * The plugin throws the following error when I attempt to enable it while running
   PHP 8 (note that my local directory structure has been replaced with “…”). It
   almost appears to be a WordPress error, and not a Better Messages error, however,
   none of my other plugins are throwing this error.
 * `Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax;
   check the manual that corresponds to your MariaDB server version for the right
   syntax to use near 'IF' at line 1 in /.../wp-includes/wp-db.php:2056 Stack trace:#
   0 /.../wp-includes/wp-db.php(2056): mysqli_query() #1 /.../wp-includes/wp-db.
   php(1945): wpdb->_do_query() #2 /.../wp-includes/wp-db.php(2695): wpdb->query()#
   3 /.../wp-admin/includes/upgrade.php(2749): wpdb->get_results() #4 /.../wp-content/
   plugins/bp-better-messages/inc/install.php(101): dbDelta() #5 /.../wp-includes/
   class-wp-hook.php(303): bpbp_install_tables() #6 /.../wp-includes/class-wp-hook.
   php(327): WP_Hook->apply_filters() #7 /.../wp-includes/plugin.php(470): WP_Hook-
   >do_action() #8 /.../wp-content/plugins/bp-better-messages/inc/install.php(115):
   do_action() #9 /.../wp-includes/class-wp-hook.php(303): bp_better_messages_activation()#
   10 /.../wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #11 /.../
   wp-includes/plugin.php(470): WP_Hook->do_action() #12 /.../wp-admin/plugins.php(
   193): do_action() #13 {main} thrown in /.../wp-includes/wp-db.php on line 2056`
    -  This topic was modified 4 years, 4 months ago by [Llewen](https://wordpress.org/support/users/llewen/).

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/php-8-error-13/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-8-error-13/page/2/?output_format=md)

 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15085553)
 * Turned out that various other plugins broke under PHP 8, so I have reverted to
   PHP 7.4. Onward and upward…
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15085846)
 * Hi there!
 * Strange thing as I know many sites running PHP8 with no problem, should be related
   to something else. Will check clean php 8 install now.
 * Thanks!
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15085866)
 * Hi there!
 * Just tested and it worked correctly for me.
    Error reported by you seems to be
   more related to MySQL error, what is mysql version do you use?
 * Thanks!
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15085980)
 * MariaDB 1:10.5.12-1
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15085990)
 * I tested with 10.3.31-MariaDB and there works. will try to test with that also.
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15085999)
 * Wonder if I’m missing a package.
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15086000)
 * Does **bpbm_threadsmeta** table created in your DB?
    -  This reply was modified 4 years, 4 months ago by [wordplus](https://wordpress.org/support/users/wordplus/).
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15086041)
 * Yes, it’s there.
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15086046)
 * There is something screwed up with my base WP install that I have been unable
   to figure out. I get permissions errors in a number of plugins when I attempt
   to change settings, even with PHP 7.4. I’m wondering if this is related.
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15086073)
 * Yes this should be related.
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15104589)
 * I was able to figure out what the issue was that was causing serious problems
   with my WordPress installation. I had changed the server signature as a joke 
   using Mod Security, however, the joke backfired. I didn’t realize that the WordPress“
   $is_apache” variable, and who knows what else, uses the server signature to allow
   plugins to make accommodations for different webserver software.
 * So I’ve fixed that, but the problem that I reported in this thread remains. I
   re-enabled PHP 8.1 and encountered the same error.
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15104593)
 * Hi there!
 * “You have an error in your SQL syntax” related to MySQL, not to PHP.
 * Thanks!
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15104605)
 * The error is in the mysqli syntax. mysqli is the PHP MySQL module, which should
   be compatible with both MySQL and MariaDB.
 *  Plugin Author [wordplus](https://wordpress.org/support/users/wordplus/)
 * (@wordplus)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15104607)
 * Hi there!
 * I cant reproduce this error in any of my installs.
    I have 0 reports about such
   issue from any of other users.
 * There is something with your website only.
 * Thanks!
 *  Thread Starter [Llewen](https://wordpress.org/support/users/llewen/)
 * (@llewen)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/#post-15104614)
 * This is clearly an error with this plugin. The only question is why you aren’t
   seeing it.

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/php-8-error-13/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-8-error-13/page/2/?output_format=md)

The topic ‘PHP 8 Error’ is closed to new replies.

 * ![](https://ps.w.org/bp-better-messages/assets/icon-256x256.png?rev=2835105)
 * [Better Messages - Live Chat, Chat Rooms, Real-Time Messaging & Private Messages](https://wordpress.org/plugins/bp-better-messages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bp-better-messages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bp-better-messages/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-better-messages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-better-messages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-better-messages/reviews/)

 * 22 replies
 * 2 participants
 * Last reply from: [Llewen](https://wordpress.org/support/users/llewen/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/php-8-error-13/page/2/#post-15113200)
 * Status: not resolved