• Llewen

    (@llewen)


    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 3 years ago by Llewen.
Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter Llewen

    (@llewen)

    Turned out that various other plugins broke under PHP 8, so I have reverted to PHP 7.4. Onward and upward…

    Plugin Author wordplus

    (@wordplus)

    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

    (@wordplus)

    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

    (@llewen)

    MariaDB 1:10.5.12-1

    Plugin Author wordplus

    (@wordplus)

    I tested with 10.3.31-MariaDB and there works. will try to test with that also.

    Thread Starter Llewen

    (@llewen)

    Wonder if I’m missing a package.

    Plugin Author wordplus

    (@wordplus)

    Does bpbm_threadsmeta table created in your DB?

    • This reply was modified 3 years ago by wordplus.
    Thread Starter Llewen

    (@llewen)

    Yes, it’s there.

    Thread Starter Llewen

    (@llewen)

    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

    (@wordplus)

    Yes this should be related.

    Thread Starter Llewen

    (@llewen)

    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

    (@wordplus)

    Hi there!

    “You have an error in your SQL syntax” related to MySQL, not to PHP.

    Thanks!

    Thread Starter Llewen

    (@llewen)

    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

    (@wordplus)

    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

    (@llewen)

    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)
  • The topic ‘PHP 8 Error’ is closed to new replies.