Multi-DB fatal error

Hiya,

Followed instructions in installing Multi-DB, got this message:

Fatal error: Call to undefined function add_dc_ip() in /home/miraculo/public_html/wp-content/mu-plugins/db-config-sample-256.php on line 16

Please advise. Thanks!

  • alberti

    Hi,

    I tried to install Multi-DB plugin according to your instructions. But, I am getting some problems, wp-admin is not opened after login and blog posts are not displayed in front end.

    db_config.php Code:
    <?php
    // Plugin Name: Multi-DB
    // Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    // 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('173.236.95.98', '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('affiliatedata');
    add_global_table('affiliatereferrers');
    add_global_table('am_actions');
    add_global_table('am_queue');
    add_global_table('am_schedule');
    add_global_table('autoblog');

    add_global_table('bp_activity');
    add_global_table('bp_activity_meta');
    add_global_table('bp_friends');
    add_global_table('bp_groups');
    add_global_table('bp_groups_groupmeta');
    add_global_table('bp_groups_members');
    add_global_table('bp_messages_messages');
    add_global_table('bp_messages_notices');

    add_global_table('bp_messages_recipients');
    add_global_table('bp_notifications');
    add_global_table('bp_user_blogs');
    add_global_table('bp_user_blogs_blogmeta');
    add_global_table('bp_xprofile_data');
    add_global_table('bp_xprofile_fields');
    add_global_table('bp_xprofile_groups');

    add_global_table('domain_mapping');

    //------------------------------------------------------------------------//
    //---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');
    add_db_server('global', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp', 'user_wp', '********');

    add_db_server('0', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp0', 'user_wp', '********');
    add_db_server('1', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp1', 'user_wp', '********');
    add_db_server('2', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp2', 'user_wp', '********');
    add_db_server('3', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp3', 'user_wp', '********');
    add_db_server('4', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp4', 'user_wp', '********');
    add_db_server('5', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp5', 'user_wp', '********');
    add_db_server('6', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp6', 'user_wp', '********');
    add_db_server('7', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp7', 'user_wp', '********');
    add_db_server('8', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp8', 'user_wp', '********');
    add_db_server('9', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wp9', 'user_wp', '********');
    add_db_server('a', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wpa', 'user_wp', '********');
    add_db_server('b', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wpb', 'user_wp', '********');
    add_db_server('c', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wpc', 'user_wp', '********');
    add_db_server('d', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wpd', 'user_wp', '********');
    add_db_server('e', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wpe', 'user_wp', '********');
    add_db_server('f', 'dc1', 1, 1,'localhost','localhost', 'miraculo_wpf', 'user_wp', '********');

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

    ?>

    Please advise. Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.