Mulit-DB Warnings

I have just installed Multi-DB on a multisite. I am receiving the following warning:

Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/equine/public_html/wp-includes/wp-db.php on line 650

I know that I could turn it off in my php.ini but just want to check to make sure it isn’t something that could cause any issues in the future.

Thank You

  • cchalmers
    • Design Lord, Child of Thor

    OOPS! …. I’m also getting these Warnings when I update or activate a plugin:

    Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/equine/public_html/wp-includes/wp-db.php on line 650

    Warning: Cannot modify header information – headers already sent by (output started at /home/equine/public_html/wp-includes/wp-db.php:650) in /home/equine/public_html/wp-includes/pluggable.php on line 876

    Warning: Cannot modify header information – headers already sent by (output started at /home/equine/public_html/wp-includes/wp-db.php:650) in /home/equine/public_html/wp-includes/pluggable.php on line 876

  • aecnu
    • WP Unicorn

    Greetings txhorselady,

    Thank you for the detailed information and sorry that you are having an issue with your WordPress installation.

    They are indeed just warnings so no need to panic, however lets see if we can address some of them.

    Please try adding this code <?php ob_start(); ?> before <!DOCTYPE html> tag in header.php to fix the header warning messages.

    Let me know how its goes.

    Cheers, Joe

  • cchalmers
    • Design Lord, Child of Thor

    But won’t I have to put that in all of my themes? The error is happening in the network admin area where I’m trying to activate a the Hello Dolly plugin as a test. The only plugins are installed is Hello Dolly and the WPMUdev dashboard at this stage.

    And isn’t that just putting a band aide on the issue and not fixing it

    After putting the code in the twentytwelve header.php I am still receiving this error in admin when I activate or deactivate a plugin.

    Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/equine/public_html/wp-includes/wp-db.php on line 650

    Warning: Cannot modify header information – headers already sent by (output started at /home/equine/public_html/wp-includes/wp-db.php:650) in /home/equine/public_html/wp-includes/pluggable.php on line 876

    Warning: Cannot modify header information – headers already sent by (output started at /home/equine/public_html/wp-includes/wp-db.php:650) in /home/equine/public_html/wp-includes/pluggable.php on line 876

  • Barry
    • DEV MAN’s Mascot

    Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/equine/public_html/wp-includes/wp-db.php on line 650

    That means the multi-db isn’t connected to a database at the time it is trying to set the charset. Can you double check the settings you have in your db-config.php file and make sure that the username / password are correct?

  • aecnu
    • WP Unicorn

    Greetings txhorselady,

    We have not heard back from you as to the status of this issue.

    If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.

    This action will also bring your ticket up front back in plain view again within the ticket system.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.