• Resolved inge12

    (@inge12)


    After server database upgrade from Mariah 10.0 to 10.3, WordPress 6.0.2 running Weaver Xtreme theme reports a lot of errors on plugins, which I subsequently deactivated. But the following plugins do not appear to be plugin-related.

    Message appears everywhere at the top of the page, often multiple times:

    Deprecated: Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /home/ssnet/public_html/wp-includes/functions.php on line 5401

    These messages appear when comment is posted:

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-content/plugins/litespeed-cache/src/vary.cls.php on line 729

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/pluggable.php on line 1421

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/pluggable.php on line 1424

    These appear at top of Admin page:

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-admin/includes/misc.php on line 1381

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/functions.php on line 6878

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-admin/admin-header.php on line 9

    What is the best way to fix these errors?

    (Since I noted a Litespeed-related error, I’m seeking help from their support forum on that particular error. Just wanted to give a complete list here.)

    Operating System
    CentOS v7.9.2009
    Product
    cPanel & WHM v106.0.7 (STANDARD)
    Using LiteSpeed Web Server plugin on an Apache system.

    WordPress 6.0.2 running Weaver Xtreme theme.

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’m using Maria 10.5, so it’s not an issue with 10.3, probably.

    It apppears you’ve enabled PHP warnings, so that might be the issue. In wp-config.php, make sure the define WP_DEBUG is set to false.

    Thread Starter inge12

    (@inge12)

    Thanks. Last I checked WP_DEBUG was set to false. But I will check again.

    It seems like the highest number of warning messages originate here:

    Deprecated: Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /home/ssnet/public_html/wp-includes/functions.php on line 5401

    I have no idea what to do about that. Is it a WordPress issue, or could it be a theme issue?

    Thread Starter inge12

    (@inge12)

    Well, you were right about the DEBUG setting. Thank you!
    I now set it to “false” and the relevant portion of the file now reads

    define (‘WPLANG’, ”);
    define (‘WP_DEBUG’, ‘false’);
    // ** Multi-site settings ** //

    However, I’m still getting this error:<blockquotDeprecated: Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /home/ssnet/public_html/wp-includes/functions.php on line 5401

    • This reply was modified 2 years, 2 months ago by inge12.
    Thread Starter inge12

    (@inge12)

    After submitting a comment on a post (with DEBUG set to “false”), I get this list of error messages, which have to be intimidating for our users!

    `Deprecated: Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in /home/ssnet/public_html/wp-includes/functions.php on line 5401

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/comment.php on line 569

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/comment.php on line 570

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/comment.php on line 571

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-content/plugins/litespeed-cache/src/vary.cls.php on line 729

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/pluggable.php on line 1421

    Warning: Cannot modify header information – headers already sent by (output started at /home/ssnet/public_html/wp-includes/functions.php:5401) in /home/ssnet/public_html/wp-includes/pluggable.php on line 1424`

    Dion

    (@diondesigns)

    You have an error in your wp-config.php file. You currently have this:

    define ('WP_DEBUG', 'false');

    Change it to this:

    define('WP_DEBUG', false);

    and the messages should be suppressed.

    Please be aware that this will only suppress the deprecated and resulting warning messages; it will not resolve the issue. It appears that you have some very old (or very poorly written) code in either your theme or in one of your active plugins, and given the nature of the deprecated function, the code is potentially unsafe. If your theme and all your plugins are up-to-date, then you shouild consider deactivating your plugins to determine whether one of them is the culprit. If the issue persists after deactivating all your plugins, then your theme is the likely culprit, and you might want to contact the theme’s author for support.

    Thread Starter inge12

    (@inge12)

    Thank you for this! It helps me to know how to move forward.

    Thread Starter inge12

    (@inge12)

    Thanks again

    Thread Starter inge12

    (@inge12)

    LOL! I was trying to mark this as “Resolved.” Maybe this time it will “take.”

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error Messages after server database upgrade’ is closed to new replies.