What would cause these errors

Well I obviously screwed up somewhere..... everything goes well till I hit step 4 in the moveblogs script... so what would cause this error? that way I know where to fix

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/XXXX/public_html/wp-content/scripts/move-blogs.php on line 140

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/XXXX/public_html/wp-content/scripts/move-blogs.php on line 141

  • Larry_D
    • Site Builder, Child of Zeus

    <?php
    // Plugin Name: Multi-DB
    // Plugin URI: https://premium.wpmudev.org/project/Multiple-Databases
    // Author: Andrew Billits (Incsub), S H Mohanjith (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.247.249.', '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('leonaaz_global');
    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('0', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_global', 'user', 'simplepassword');

    add_db_server('0', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_0', 'user', 'simplepassword');
    add_db_server('1', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_1', 'user', 'simplepassword');
    add_db_server('2', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_2', 'user', 'simplepassword');
    add_db_server('3', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_3', 'user', 'simplepassword');
    add_db_server('4', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_4', 'user', 'simplepassword');
    add_db_server('5', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_5', 'user', 'simplepassword');
    add_db_server('6', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_6', 'user', 'simplepassword');
    add_db_server('7', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_7', 'user', 'simplepassword');
    add_db_server('8', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_8', 'user', 'simplepassword');
    add_db_server('9', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_9', 'user', 'simplepassword');
    add_db_server('a', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_a', 'user', 'simplepassword');
    add_db_server('b', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_b', 'user', 'simplepassword');
    add_db_server('c', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_c', 'user', 'simplepassword');
    add_db_server('d', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_d', 'user', 'simplepassword');
    add_db_server('e', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_e', 'user', 'simplepassword');
    add_db_server('f', 'dc1', 1, 1,'','173.247.249.5', 'leonaaz_f', 'user', 'simplepassword');

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

    ?>

    ___________________________________________________________________________

    Barry,
    I had the add_db_server line reading as:
    add_db_server('0', 'dc1', 1, 1,'173.247.249.5','173.247.249.5', 'leonaaz_0', 'user', 'simplepassword');

    You can see what I've done start to finish at this link...
    https://premium.wpmudev.org/forums/topic/walking-through-setup#post-88543

    I know it's a lot of information. But I hope we can resolve this issue. I've tried to set this up 4x's now with the duplicated results. I have that site suspended at the moment, but can bring on line if you need.

    Thank you.

  • Larry_D
    • Site Builder, Child of Zeus

    Barry,
    This is the error message on the home page after trying to establish the new multidatabase.

    Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /home/leonaaz/public_html/wp-content/db.php on line 669

    Warning: Cannot modify header information - headers already sent by (output started at /home/leonaaz/public_html/wp-content/db.php:669) in /home/leonaaz/public_html/wp-includes/functions.php on line 3191
    Error establishing a database connection

  • Barry
    • DEV MAN’s Mascot

    Pretty sure this is related to Larry_D's other thread about not being able to set user permissions on his databases - at least that is what the error looks like and the config are the same for both threads.

    I suggest moving all further notes on this thread to the other as that is the one with the main issues and these errors are because of those issues.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.