Problem with Problogs Beta 6 and Multi DB

I have been testing ProBlogs Beta 6 with different configurations of MultiDB (256 and 4096) and with the default DB and whenever I use whatever configuration of MultiDB, I am unable to save the settings of ProBlogs (what actually happens is that whenever I save the settings, the entire settings page returns to default). If I use the default Multisite DB configuration I am able to do anything with the Beta version and do not get the problems associated with MultDB use.

The 2 installations have worked well till the problogs beta testing and have been configured exactly as directed. Any inputs are appreciated. Topic is also posted on the problogs thread but I figured this was more a MultiDB problem than it was the Beta 6 problem.

Here is a copy of my db-config.php file for my 256 setup (very much like the 4096)

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

//Support and FAQ Plugin
add_global_table('system_faq');
add_global_table('system_faq_cats');
add_global_table('system_tickets');
add_global_table('system_tickets_cats');
add_global_table('system_tickets_messages');

//Supporter
add_global_table('supporters');
add_global_table('supporter_signup_stats');
add_global_table('supporter_daily_stats');
add_global_table('supporter_ads');

//Domain Mapping
add_global_table('domain_mapping');

//Anti Splog
//add_global_table('ust');

//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');

//------------------------------------------------------------------------//
//---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');

//wp dev
add_db_server('global', 'dc1', 1, 1,'','localhost', 'mutable_global', 'muuser', 'mupassword);

add_db_server('00', 'dc1', 1, 1,'','localhost', 'mutable_00', 'muuser', 'mupassword');
add_db_server('01', 'dc1', 1, 1,'','localhost', 'mutable_01', 'muuser', 'mupassword');
add_db_server('02', 'dc1', 1, 1,'','localhost', 'mutable_02', 'muuser', 'mupassword');
add_db_server('03', 'dc1', 1, 1,'','localhost', 'mutable_03', 'muuser', 'mupassword');
add_db_server('04', 'dc1', 1, 1,'','localhost', 'mutable_04', 'muuser', 'mupassword');
add_db_server('05', 'dc1', 1, 1,'','localhost', 'mutable_05', 'muuser', 'mupassword');

  • Philip John
    • DEV MAN’s Apprentice

    Hiya!

    First off, a few questions so we can fully understand your set up;
    - is this a new site (i.e. freshly installed multi-db, pro-blogs) or has it been around for a while?
    - if not, does a new site on the same server with only multi-db and pro-blogs have the same issue?
    - does pro-blogs work on it's own without multi-db?
    - does multi-db function fine without pro-blogs?
    - is it just beta 6 or do previous betas have the same issue (if you've tried them)?

    Cheers,
    Phil

  • magakrav
    • Design Lord, Child of Thor

    Phil,

    Here are my responses:

    - is this a new site (i.e. freshly installed multi-db, pro-blogs) or has it been around for a while?
    I have used this on 2 test and one live site both test sites are fresh, live site is the production site
    - if not, does a new site on the same server with only multi-db and pro-blogs have the same issue?
    - does pro-blogs work on it's own without multi-db?
    It works on its own fine, if I take out multi db files from /wp-content
    - does multi-db function fine without pro-blogs?
    Yes
    - is it just beta 6 or do previous betas have the same issue (if you've tried them)?
    Betas 1,2,4,5,6

  • magakrav
    • Design Lord, Child of Thor

    Barry,

    I have 3 prosite tables on the mysite_global table.

    pro_sites
    pro_sites_signup_stats
    pro_sites_daily_stats

    Manually created by sql

    $table1 = "CREATE TABLE {$wpdb->base_prefix}pro_sites (
    blog_ID bigint(20) NOT NULL,
    level int(3) NOT NULL DEFAULT 1,
    expire bigint(20) NOT NULL,
    gateway varchar(25) NULL DEFAULT 'PayPal',
    term varchar(25) NULL DEFAULT NULL,
    amount varchar(10) NULL DEFAULT NULL,
    PRIMARY KEY (blog_ID),
    KEY blog_ID (blog_ID, level, expire)
    );";

    $table2 = "CREATE TABLE {$wpdb->base_prefix}pro_sites_signup_stats (
    action_ID bigint(20) unsigned NOT NULL auto_increment,
    blog_ID bigint(20) NOT NULL,
    action varchar(20) NOT NULL,
    time_stamp DATE NOT NULL,
    PRIMARY KEY (action_ID)
    );";

    $table3 = "CREATE TABLE {$wpdb->base_prefix}pro_sites_daily_stats (
    id bigint(20) unsigned NOT NULL auto_increment,
    date DATE NOT NULL,
    supporter_count int(10) NOT NULL DEFAULT 0,
    expired_count int(10) NOT NULL DEFAULT 0,
    term_count_1 int(10) NOT NULL DEFAULT 0,
    term_count_3 int(10) NOT NULL DEFAULT 0,
    term_count_12 int(10) NOT NULL DEFAULT 0,
    term_count_manual int(10) NOT NULL DEFAULT 0,
    level_count_1 int(10) NOT NULL DEFAULT 0,
    level_count_2 int(10) NOT NULL DEFAULT 0,
    level_count_3 int(10) NOT NULL DEFAULT 0,
    level_count_4 int(10) NOT NULL DEFAULT 0,
    level_count_5 int(10) NOT NULL DEFAULT 0,
    level_count_6 int(10) NOT NULL DEFAULT 0,
    level_count_7 int(10) NOT NULL DEFAULT 0,
    level_count_8 int(10) NOT NULL DEFAULT 0,
    level_count_9 int(10) NOT NULL DEFAULT 0,
    level_count_10 int(10) NOT NULL DEFAULT 0,
    PRIMARY KEY (id)
    );";

  • magakrav
    • Design Lord, Child of Thor

    Aaron,

    I was looking at that yesterday, the "psts_settings" line should change whenever I make setting changes but it just reverts back to the default values.

    What I tried to do was get the "psts_settings" of the non-MultiDB prosite working installation and paste it in the non working installation but as soon as I click on the "Settings" menu on the pro site tab it reverts back to default.

    I tried something last night and change the database value of my wp-config.php file from "mysite" to "
    "mysite_global" and I was able to change settings but whenever ANY user of the site logs into their admin section, they inadvertently "reset" the problogs settings to default and when I mean anybody I mean anybody logging into their admin panel.

    Now I am thinking it is a DB connection issue given changing a value allowed me to change and save settings.

  • magakrav
    • Design Lord, Child of Thor

    I've just discovered a partial work around

    changed my db-config values from

    add_db_server('00', 'dc1', 1, 1,'','localhost', 'table_00', 'user', 'password');

    add_db_server('00', 'dc1', 1, 1,'localhost','localhost', 'table_00', 'user', 'password');

    And I was able to save settings and the activity of other users on their admin panels did not reset my settings.

    2 problems though:

    1. I ran a parallel load test using various site loading time sites and from 1.4 seconds of loading time the site has now gone to 34 seconds and some servers even report 503 errors
    2. I am now unable to create a new site from registration, and whenever I try to manually create one from signing up, after clicking on the activation email, I am brought to the site has been created page but whenever I click on the subdomain link to the newly created site, its a instant 500 error and when I try to visit its admin, I dont go anywhere

  • troykd
    • The Crimson Coder

    Magakrav: I'm one of the ones having this problem.

    Here's my set up and you can tell me if you have anything in common. I'm set up on a VPS (Wiredtree hosting) with Centos and Cpanel. Wordpress was originally installed with Fantastico. We've had the Supporter plugin installed and works fine (uninstalled now of course).

    With prosites installed, we can't create new sites without getting the "Error establishing a database connection" message when the new site is visited. Turn off prosites and everything is fine and can create new sites without an error.

    It's basically a test site at this point until prosites is working with multi-db.

  • troykd
    • The Crimson Coder

    Oh, and it's sub-domains and multi-db v3.0.6.

    I can upgrade to 3.0.7 but will need to know what needs to be changed. I just see the entire install instructions and nothing for upgrade instructions.

    Barry and Aaron - your welcome to dig around in my site if you want access to a site with the problem.

  • magakrav
    • Design Lord, Child of Thor

    @troykd @Aaron

    I can confirm that site creation with active Prosites Beta 7 is now possible with MultiDB 3.0.7. I just posted on the Prosites Beta 7 thread.

    I upgraded from 3.0.6 to the latest by changing the db.php file and by uploading (and network activating) the "plugin" folder included ( I only assumed it goes inside the wp-content/plugins folder)

    Looking at server logs now and everything seems fine!

    Had some issues with special languages/characters though - it came out funky but changed char set in wp-config.php to '' from 'utf-8'

    @tryokd - can you confirm creation of sites on your end? I used to get 500 error and "aborted" sites with old version of multidb - no longer!

  • troykd
    • The Crimson Coder

    Aaron, installed (or rather Mustafa installed) 3.0.7 and still have a problem.

    The error changed and is now is "The site you have requested is not installed properly. Please contact the system administrator."

    Deactivate Pro Sites and I can create sites again.

    Sorry!

  • Mustafa
    • Syntax Hero

    As I said before that,more interesting situation.
    I'm sure multidb version 3.0.7 and actived multi-db plugin.I can't see any important difference.

    I thought maybe that's about mysql user authority.
    Than I give full permission mysql user but nothing changed.

    We are using plesk pannel for our network.(working pro-sites fine)
    But troykd is using whm pannel.I don't think but maybe it's about server configuration.(not working pro-sites)

  • Aaron
    • CTO

    I've setup my own fresh multidb test site with pro sites and absolutely no issues at all.

    I'm guessing that maybe it's a configuration problem in your db-config.php file. Can you paste the troublesome one here with passwords blanked out? We only need the first few db specific lines, not all 256 or whatever.

  • troykd
    • The Crimson Coder

    Here you go .. Thanks!

    <?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', '256');
    //------------------------------------------------------------------------//
    //---DC IPs---------------------------------------------------------------//
    //------------------------------------------------------------------------//
    //	Usage: add_dc_ip(IP, DC)
    //	EX: add_dc_ip('123.123.123.', 'dc1');
    add_dc_ip('173.199.132.xx', '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('agenthu_wrdp1_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('supporters');
    add_global_table('supporter_signup_stats');
    add_global_table('supporter_daily_stats');
    add_global_table('supporter_ads');
    
    add_global_table('domain_mapping');
    add_global_table('ust');
    //------------------------------------------------------------------------//
    //---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,'','173.199.132.xx', 'agenthu_wrdp1_global', 'agenthu_wrdp1',  'removed');
    
    add_db_server('00', 'dc1', 1, 1,'','173.199.132.xx', 'agenthu_wrdp1_00', 'agenthu_wrdp1',  'removed');
    add_db_server('01', 'dc1', 1, 1,'','173.199.132.xx', 'agenthu_wrdp1_01', 'agenthu_wrdp1',  'removed');
    add_db_server('02', 'dc1', 1, 1,'','173.199.132.xx', 'agenthu_wrdp1_02', 'agenthu_wrdp1',  'removed');

    ETC...

  • Aaron
    • CTO

    Ok, not sure if these are the cause but:
    add_dc_ip('173.199.132.xx', 'dc1'); should be add_dc_ip('173.199.132.', 'dc1');

    And for all the add_db_server() calls, you need to set the db location for both fields, if on localhost just use:
    add_db_server('global', 'dc1', 1, 1,'localhost','localhost', 'agenthu_wrdp1_global', 'agenthu_wrdp1', 'password');
    or if you db is at 173.199.132.255 then:
    add_db_server('global', 'dc1', 1, 1,'173.199.132.255','173.199.132.255', 'agenthu_wrdp1_global', 'agenthu_wrdp1', 'password');

    Here is what I use for my server with db on same server:

    add_dc_ip('127.0.0.', 'dc1');
    add_db_server('global', 'dc1', 1, 1,'localhost','localhost', 'multidb_global', 'user',  'pass');
    add_db_server('0', 'dc1', 1, 1,'localhost','localhost', 'multidb_0', 'user',  'pass');
    add_db_server('1', 'dc1', 1, 1,'localhost','localhost', 'multidb_1', 'user',  'pass');
  • troykd
    • The Crimson Coder

    From my hosting company about this issue:

    There's nothing wrong with the server, there is an issue with the configuration for whatever script you are running.

    If you are trying to create wp_pro_sites_daily_stats table with the script you are running, but it already exists, it is going to error out. I would suggest backing up your data and then removing that table and run the import script again.

    Is this the problem? So once again, what about the erro with the 'wp_pro_sites_daily_stats' table

  • troykd
    • The Crimson Coder

    I just noticed something that might be missing, realize I know squat about this stuff.

    in global
    add_db_server('global', 'dc1', 1, 1,'','127.0.0.1', 'agenthu_wrdp1_global', 'agenthu_wrdp1', 'password');

    and all of the db's
    add_db_server('04', 'dc1', 1, 1,'','127.0.0.1', 'agenthu_wrdp1_04', 'agenthu_wrdp1', 'password');

    In your example, the localhost or IP is repeated twice in the add_db_server string. In mine, it's done once and the first set of tick marks (whatever you call them) after the \\,1,1,\\ are empty. Is that a problem.

  • troykd
    • The Crimson Coder

    Mustafa will be wiping out the site and starting it over (complete wp reinstall) with just multi-db, domain mapping and pro sites. Hopefully this basic install will work and I can quit whining. Will let you know how it goes.

  • successwebsolutions
    • Site Builder, Child of Zeus

    Not sure if this is a multi-db issue.

    I am having the problem of the module/gateways settings not saving. Also, every time I try to save the settings it keeps creating a "Pro Site" page, so I wind up with multiple "Pro Site" pages.

    I have installed:

    WPMU 3.2.1
    Multi-DB Ver 3.0.7
    Pro Sites Ver 3.0 RC 1

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.