WP(MS) 3.0.1 and MultiDB 3.0.1

Hiya guys,

I’m not sure if it’s WP or MultiDB or both :slight_smile:

On several installs of WP 3.0.1 (multi-site) and MultiDB 3.0.1 we’re getting

Warning: mysql_error(): 21 is not a valid MySQL-Link resource in …/wp-content/db.php on line 291 Warning: mysql_real_escape_string(): 21 is not a valid MySQL-Link resource in …/wp-includes/wp-db.php on line 785

This happens sporadically, but in most cases when we try to change something in Super Admin -> Options.

Also, some boxes in Super Admin -> Options (like disk space quota) show up empty, although values are present in global DB.

Ideas? :slight_smile:

  • VentureMaker
    • Site Builder, Child of Zeus

    Today I noticed this in error logs:

    PHP Warning: mysql_real_escape_string() expects parameter 1 to be string, object given in /public_html/wp-includes/wp-db.php on line 785

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

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

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

  • VentureMaker
    • Site Builder, Child of Zeus

    Another set:

    PHP Warning: Cannot modify header information – headers already sent by (output started at /public_html/wp-content/mu-plugins/avatars.php:97) in /public_html/wp-content/blog-suspended.php on line 27

    PHP Warning: Invalid argument supplied for foreach() in /public_html/wp-admin/edit-comments.php on line 41

    PHP Warning: Cannot modify header information – headers already sent by (output started at /public_html/wp-admin/edit-comments.php:41) in /public_html/wp-includes/pluggable.php on line 890

  • VentureMaker
    • Site Builder, Child of Zeus

    Also this. Dunno if it helps you :slight_smile:

    PHP Warning: Cannot modify header information – headers already sent by (output started at /public_html/wp-content/mu-plugins/avatars.php:111) in /public_html/wp-includes/pluggable.php on line 890

    PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /public_html/wp-content/mu-plugins/avatars.php on line 472

    PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /public_html/wp-content/mu-plugins/avatars.php on line 480

    PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /public_html/wp-content/mu-plugins/avatars.php on line 488

    PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /public_html/wp-content/mu-plugins/avatars.php on line 496

    PHP Warning: imagecopyresampled(): supplied argument is not a valid Image resource in /public_html/wp-content/mu-plugins/avatars.php on line 504

    PHP Warning: unlink(/home/weblog/public_html/wp-content/avatars/blog/2ca/): Is a directory in /public_html/wp-content/mu-plugins/avatars.php on line 1236

    PHP Fatal error: Call to a member function get() on a non-object in /public_html/wp-includes/cache.php on line 93

    PHP Notice: Trying to get property of non-object in /public_html/wp-includes/link-template.php on line 36

  • fiddyp
    • Site Builder, Child of Zeus

    I’m getting this error when I’m foreach-ing through an array of objects and trying to fetch an option from each blog using get_blog_option($blog->blog_id,'option_name');

    Warning: mysql_real_escape_string(): 15 is not a valid MySQL-Link resource in …wp-includes/wp-db.php on line 785

    It only happens on some blog ids and there seems to be no pattern to it. Some blogs are ok, some have been deleted, others have no option with that name.

    Hope this can be of assistance in finding what is causing it

    [update]

    The errors I’m getting are in a file in mu-plugins, the functions are running on /wp-admin/ms-admin.php?page=mypage

    I can use the same function on the same sites without errors if I’m calling it in a function called by the action of manage_blogs_custom_column

    maybe it’s because my mu-plugins file is being called too early for a vital include file to be included?