db.php on line 839

after configure the db-config. i check my screen and this come up:

Warning: Invalid argument supplied for foreach() in /home/noel7000/public_html/sitesini.com/wp-content/db.php on line 839

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/noel7000/public_html/sitesini.com/wp-content/db.php on line 437

Warning: Cannot modify header information - headers already sent by (output started at /home/noel7000/public_html/sitesini.com/wp-content/db.php:839) in /home/noel7000/public_html/sitesini.com/wpmu-settings.php on line 154

What should i do?

  • eskyjonathan

    // Usage: add_dc_ip(IP, DC)
    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('174.120.153.221', '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');

    add_db_server('0', 'dc1', 1, 1,'174.120.153.221','localhost', 'noel7000_sites0', 'noel7000_sites', 'xxxxxxxxxx');
    add_db_server('1', 'dc1', 1, 1,'174.120.153.221','localhost', 'noel7000_sites1', 'noel7000_sites', 'xxxxxxxxxx');
    add_db_server('2', 'dc1', 1, 1,'174.120.153.221','localhost', 'noel7000_sites2', 'noel7000_sites', 'xxxxxxxxxx');

  • eskyjonathan

    same error:-

    Warning: Invalid argument supplied for foreach() in /home/noel7000/public_html/sitesini.com/wp-content/db.php on line 839

    Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/noel7000/public_html/sitesini.com/wp-content/db.php on line 437

    Warning: Cannot modify header information - headers already sent by (output started at /home/noel7000/public_html/sitesini.com/wp-content/db.php:839) in /home/noel7000/public_html/sitesini.com/wpmu-settings.php on line 154

  • eskyjonathan

    I am loss here:

    as sample:

    add_global_table('some_global_table');
    //------------------------------------------------------------------------//
    //---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.com:3509','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
    add_db_server('global', 'dc1', 1, 1,'64.120.23.72','192.168.0.101', 'wpmu_global', 'db_user_name', 'db_user_name_pass');

  • eskyjonathan

    this is my setting:

    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('174.120.153.', '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');
    add_global_table('some_global_table');

    add_db_server('0', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites0', 'noel7000_sites', 'xxxxxxx');
    add_db_server('1', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites1', 'noel7000_sites', 'xxxxxxx');
    add_db_server('2', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites2', 'noel7000_sites', 'xxxxxxx');

  • eskyjonathan

    1) When you created your new databases did you create a global database? Something like noel7000_sitesglobal?

    ans: NO

    2) Have you already ran the move-blogs.php script?

    Ans: NO . how to run this script? I have put it into the script folder as your instruction.

    Also, can you please post your entire db-config.php (with the passwords masked like you've been doing)?

    <?php
    // Plugin Name: Multi-DB
    // Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    // Author: Andrew Billits (Incsub)
    // Version: 2.8.5
    //------------------------------------------------------------------------//
    //---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('174.120.153.', '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');
    add_global_table('some_global_table');

    add_db_server('0', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites0', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('1', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites1', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('2', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites2', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('3', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites3', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('4', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites4', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('5', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites5', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('6', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites6', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('7', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites7', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('8', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites8', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('9', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sites9', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('a', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitesa', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('b', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitesb', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('c', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitesc', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('d', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitesd', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('e', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitese', 'noel7000_sites', 'xxxxxxxxx');
    add_db_server('f', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitesf', 'noel7000_sites', 'xxxxxxxxx');

    //------------------------------------------------------------------------//
    //---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.com:3509','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.com:3509','global.mysql.example.lan:3509', 'global-db', 'globaluser', 'globalpassword');
    //------------------------------------------------------------------------//
    //---VIP Blogs------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_vip_blog(BLOG_ID, DS)
    // EX: add_vip_blog(1, 'vip1');

    ?>

  • Andrew

    Hiya,

    You need to create a global database then. I'd call it: noel7000_sitesglobal

    Next you need to add this line:

    add_db_server('global', 'dc1', 1, 1,'localhost','localhost', 'noel7000_sitesglobal', 'noel7000_sites', 'xxxxxxxxx');

    After that you need to open up move-blogs.php and edit the configuration bits that the top of the file. After you've done that please post those configuration lines here (with password masked) so that I can make sure you've filled them out correctly.

    Thanks,
    Andrew