Multi DB warning

Hi Guys,

Got a problem, I've currently installed multidb on a new wpmu network (my main domain and a test blog), i set up 256 DB's, completed installing multidb but when i visit my site i get this message:

Warning: Invalid argument supplied for foreach() in /home/marketbl/public_html/wp-content/db.php on line 164

Fatal error: Call to undefined method m_wpdb::handle_error_connecting() in /home/marketbl/public_html/wp-content/db.php on line 223

so i deleted the db.php file and the site appeared.

Any ideas? Have i missed something? Followed a tutorial i came across online.


  • marcobrasil65

    I have a problem to install multi db wordpress mu 2.9.2 the error is this:

    Warning Invalid Argument supplied for foreach() in xxx/xxx/xxx/wp-content/db.php on line 164

    and error

    Fatal Error: Call to undefinied methd m_wpdb::handle_error_connecting() in xxx/xxx/xxx/wp-content/db.php on line 223

    Is possissible resolve?

    i installed wp mu 2.9.2

    host have gostgator

    Please help to multidb 4096 for networg blog

  • JimKernan

    // Plugin Name: Multi-DB
    // Plugin URI:
    // Author: Andrew Billits (Incsub)
    // Version: 2.9.2
    //---DB Scaling-----------------------------------------------------------//
    // 16,256,4096
    define ('DB_SCALING', '16');
    //---DC IPs---------------------------------------------------------------//
    // Usage: add_dc_ip(IP, DC)
    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('', 'dc1');
    //---Global Tables--------------------------------------------------------//
    // Do not include default global tables
    // Leave off base prefix (eg: wp_)
    // Usage: add_global_table(TABLE_NAME)
    // EX: add_global_table('something');
    //---DB Servers-----------------------------------------------------------//
    // Database servers grouped by dataset.
    // R can be 0 (no reads) or a positive integer indicating the order
    // in which to attempt communication (all locals, then all remotes)
    // Usage: add_db_server(DS, DC, READ, WRITE, HOST, LAN_HOST, NAME, USER, PASS)
    // EX: add_db_server('global', 'dc1', 1, 1,'','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    // Note: you can also place this section in a file called db-list.php in wp-content
    // EX: add_db_server('global', 'dc1', 1, 1,'','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    add_db_server('0', 'dc1', 1, 1,'','', 'db_global', 'user', 'password');

    add_db_server('0', 'dc1', 1, 1,'','', 'db_0', 'user', 'password');
    add_db_server('1', 'dc1', 1, 1,'','', 'db_1', 'user', 'password');
    add_db_server('2', 'dc1', 1, 1,'','', 'db_2', 'user', 'password');
    add_db_server('3', 'dc1', 1, 1,'','', 'db_3', 'user', 'password');
    add_db_server('4', 'dc1', 1, 1,'','', 'db_4', 'user', 'password');
    add_db_server('5', 'dc1', 1, 1,'','', 'db_5', 'user', 'password');
    add_db_server('6', 'dc1', 1, 1,'','', 'db_6', 'user', 'password');
    add_db_server('7', 'dc1', 1, 1,'','', 'db_7', 'user', 'password');
    add_db_server('8', 'dc1', 1, 1,'','', 'db_8', 'user', 'password');
    add_db_server('9', 'dc1', 1, 1,'','', 'db_9', 'user', 'password');
    add_db_server('a', 'dc1', 1, 1,'','', 'db_a', 'user', 'password');
    add_db_server('b', 'dc1', 1, 1,'','', 'db_b', 'user', 'password');
    add_db_server('c', 'dc1', 1, 1,'','', 'db_c', 'user', 'password');
    add_db_server('d', 'dc1', 1, 1,'','', 'db_d', 'user', 'password');
    add_db_server('e', 'dc1', 1, 1,'','', 'db_e', 'user', 'password');
    add_db_server('f', 'dc1', 1, 1,'','', 'db_f', 'user', 'password');

    //---VIP Blogs------------------------------------------------------------//
    // Usage: add_vip_blog(BLOG_ID, DS)
    // EX: add_vip_blog(1, 'vip1');

    Thanks in advance

  • turkon

    I have solved the problem. I was living the problem because of localhost.Use this like this. The errors will go. And everything seems working right now.

    add_db_server('global', 'dc1', 1, 1,'','localhost', 'ra6org1_global', 'username', 'password');
    add_db_server('0', 'dc1', 1, 1,'','localhost', 'ra6org1_0', 'username', 'password');
    add_db_server('1', 'dc1', 1, 1,'','localhost', 'ra6org1_1', 'username', 'password');
    add_db_server('2', 'dc1', 1, 1,'','localhost', 'ra6org1_2', 'username', 'password');
    add_db_server('3', 'dc1', 1, 1,'','localhost', 'ra6org1_3', 'username', 'password');
    add_db_server('4', 'dc1', 1, 1,'','localhost', 'ra6org1_4', 'username', 'password');
    add_db_server('5', 'dc1', 1, 1,'','localhost', 'ra6org1_5', 'username', 'password');
    add_db_server('6', 'dc1', 1, 1,'','localhost', 'ra6org1_6', 'username', 'password');
    add_db_server('7', 'dc1', 1, 1,'','localhost', 'ra6org1_7', 'username', 'password');
    add_db_server('8', 'dc1', 1, 1,'','localhost', 'ra6org1_8', 'username', 'password');
    add_db_server('9', 'dc1', 1, 1,'','localhost', 'ra6org1_9', 'username', 'password');
    add_db_server('a', 'dc1', 1, 1,'','localhost', 'ra6org1_a', 'username', 'password');
    add_db_server('b', 'dc1', 1, 1,'','localhost', 'ra6org1_b', 'username', 'password');
    add_db_server('c', 'dc1', 1, 1,'','localhost', 'ra6org1_c', 'username', 'password');
    add_db_server('d', 'dc1', 1, 1,'','localhost', 'ra6org1_d', 'username', 'password');
    add_db_server('e', 'dc1', 1, 1,'','localhost', 'ra6org1_e', 'username', 'password');
    add_db_server('f', 'dc1', 1, 1,'','localhost', 'ra6org1_f', 'username', 'password');

    But I have some questions,how will I be sure about the server's database if it is using the old one or new ones?


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.