• Resolved artiomrudenco

    (@artiomrudenco)


    We got fatal error on updating to PHP 8.1
    WordPress version: 6.1.1
    PHP version: 8.1

    Error message:

    Got error ‘PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IF’ at line 1 in ……/frontend/wp-content/db.php:1201\nStack trace:\n#0 ……/frontend/wp-content/db.php(1201): mysqli_query()\n#1 ……/frontend/wp-content/db.php(838): hyperdb->ex_mysql_query()\n#2 ……/frontend/wp/wp-includes/class-wpdb.php(2854): hyperdb->query()\n#3 ……/frontend/wp/wp-admin/includes/upgrade.php(2792): wpdb->get_results()\n#4 ……/frontend/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php(412): dbDelta()\n#5 ……/frontend/wp-content/plugins/wp-maintenance-mode/includ…’,

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Vytis

    (@bvytis)

    Hi @artiomrudenco,

    Thank you for using our plugin, it looks like this is a duplicate of an issue here – https://www.ads-software.com/support/topic/fatal-uncaught-mysqli_sql_exception/#post-16451626

    Can you try to re-install the plugin if your WordPress is up-to-date? Thanks!

    Thread Starter artiomrudenco

    (@artiomrudenco)

    Hi @bvytis ,
    Id doesn’t helped.
    I got same problem on other APP.
    Could you check it please?

    Error:
    Got error ‘PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IF’ at line 1 in ***/frontend/wp-content/db.php:1201\nStack trace:

    \n#0 ***/frontend/wp-content/db.php(1201): mysqli_query()

    \n#1 ***/frontend/wp-content/db.php(838): hyperdb->ex_mysql_query()

    \n#2 ***/frontend/wp/wp-includes/class-wpdb.php(2854): hyperdb->query()

    \n#3 /***/frontend/wp/wp-admin/includes/upgrade.php(2792): wpdb->get_results()

    \n#4 ***/frontend/wp-content/plugins/wp-maintenance-mode/includes/classes/wp-maintenance-mode.php(412): dbDelta()

    \n#5 ***/frontend/wp-content/plugins/wp-maintenance-mode/includes/clas…’, referer ******/wp-admin/post.php?post=8759&action=edit&classic-editor

    APP_ENV=prod LOG_TYPE=apache_error

    Thread Starter artiomrudenco

    (@artiomrudenco)

    @bvytis
    I don’t think is related, but trying to catch error (found reason) I got another error on localmachine (query monitor):
    Warning Undefined array key “social_instagram”
    According to Modules menu -> It is not mandatory.

    1. wp-content/plugins/wp-maintenance-mode/views/settings.php:734
    2. WP_Maintenance_Mode_Admin->display_plugin_settings()
      wp-includes/class-wp-hook.php:308
    3. do_action('settings_page_wp-maintenance-mode')
      wp-admin/admin.php:259
    Plugin Support Vytis

    (@bvytis)

    Hi @artiomrudenco,

    I see there are a few similar reports related to this error.

    Could you please submit this form – https://docs.google.com/forms/d/1qQAPC4YflcwOMpqoN-ENbgfNj2qKIKmDvz22WaE8gOk/

    Then, we’ll be able to get more information about your WordPress instance and used plugins so we can communicate it to our developers with more information and potential incompatibilities.

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error mysqli_sql_exception in wp-maintenance-mode’ is closed to new replies.