500 Internal server error (move-blogs.php)

I'm trying to install this plugin, tried to follow the directions and I keep getting a 500 internal server error when I visit move-blogs.php I am not sure the next steps to get this working. I am on Bluehost, set up to run 256 databases. I am sure that it is my fault, I might just need someone to review the set up.

  • Michael

    I set up the site as a clean MU install, moved the site database to the global database I set up in the db-config.php. All of the plug-ins and themes are disabled/ not set up. All seems well, the redirect loop is resolved.

    I still get the 500 internal server error.
    http://behaviorconnect.net/move/move-blogs.php

    When I attempt to create a new site, I get this error:
    Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/dogbeha2/public_html/wp-includes/wp-db.php on line 641 Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/dogbeha2/public_html/wp-includes/wp-db.php on line 641 Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/dogbeha2/public_html/wp-includes/wp-db.php on line 641 Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in /home/dogbeha2/public_html/wp-includes/wp-db.php on line 641 Warning: Cannot modify header information - headers already sent by (output started at /home/dogbeha2/public_html/wp-includes/wp-db.php:641) in /home/dogbeha2/public_html/wp-includes/pluggable.php on line 899

  • Michael

    db-config.php

    //------------------------------------------------------------------------//
    //---DB Scaling-----------------------------------------------------------//
    //------------------------------------------------------------------------//
    // 16,256,4096
    define ('DB_SCALING', '256');
    //------------------------------------------------------------------------//
    //---DC IPs---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    // Usage: add_dc_ip(IP, DC)
    // EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('192.163.195.99', '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('global_table');

    add_db_server('global', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_global', 'dogbeha2_network', '************');

    add_db_server('00', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_network00', 'dogbeha2_network', '************');
    add_db_server('01', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_network01', 'dogbeha2_network', '************');
    add_db_server('02', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_network02', 'dogbeha2_network', '************');
    add_db_server('03', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_network03', 'dogbeha2_network', '************');
    add_db_server('04', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_network04', 'dogbeha2_network', '************');
    add_db_server('05', 'dc1', 1, 1,'','behaviorconnect.net', 'dogbeha2_network05', 'dogbeha2_network', '************');

    etc. up to 256...

    move-blogs.php

    //------------------------------------------------------------------------//
    //---Config---------------------------------------------------------------//
    //------------------------------------------------------------------------//

    ///DB Settings
    $dbname = "dogbeha2_network"; //This is your current database
    $blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
    $newdb_prefix = 'dogbeha2_network'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble

    //We need info to connect to the databases
    $dbhost = 'dogbehaviorscience.net';
    $dbuname = 'dogbeha2_network';
    $dbpass = '************';

    //How many db's are you moving into (16, 256, or 4096)?
    $db_scaling = '256';

  • Michael

    I believe the source of the 500 internal server area were these lines: $dbname and $newdb_prefix. The script wanted a completely new database to import into. Since I was working with a new install to the database "dogbeha2_global", I just dropped all the tables in "dogbeha2_network" and used that database as the new database.

    $dbname = "dogbeha2_global"; //This is your current database
    $blog_table_prefix = 'wp_'; //Prefix of your wpmu blog tables, most likely this won't need to be changed
    $newdb_prefix = 'dogbeha2_network'; //This is the prefix of the db's you're moving your tables into - we assume they are all the same, if not, you're in trouble

    With the other issues, the redirect-loop was somewhere in the old database, I assume it was linked to the existing membership install. Both the redirect-loop and debug warning persisted even with the new install if I pointed the new-clean install back to the old database, Both issues were solved with the totally clean install and databases, I do not know if this helped, but I was careful to enable the database script first, then I enabled the membership and prosites plugins taking snapshots at each step. This both resolved the error messages. I figured since this was a new site that conceivably tens of thousands of users WILL be depending on, might as well start clean and error/ warning free, even if the warnings do not effect the overall site performance.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.