• I have WP multisite subdomain install (don’t remember the starting version, but it still use blogs dir) and using SharDB 2.7.5 (256 databases), currently provide service for hundreds to thousands blog, lately the wordpress is automatically update to WP 4.0 and the subdomain still can accessed, is this mean that SharDB compatible with wp 4.0 ?

    https://wordpress.org/plugins/shardb/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Ron Rennick

    (@wpmuguru)

    is this mean that SharDB compatible with wp 4.0 ?

    Yes.

    Thread Starter r1weedee

    (@r1weedee)

    ok then, since SharDB works with latest WP, my real case is (should i make new thread?, or continuing this one are ok?) the WP multisite is compromised a lot before the automatic update to WP 4.0 (shell backdoor, phising script, deface, etc), i have clean them all for now but i am not sure whether if there is still bad script injected somewhere else that i can’t see

    now i wonder if i can do this approach for security reason? : changing whole file WP 4.0 (upgrade) with new WP 4.0 files (download), adjust all plugin files like old one (but using the latest version including ShardDB 2.7.7) and preserve all configuration files either the databases with the old one?

    Plugin Author Ron Rennick

    (@wpmuguru)

    now i wonder if i can do this approach for security reason? : changing whole file WP 4.0 (upgrade) with new WP 4.0 files (download), adjust all plugin files like old one (but using the latest version including ShardDB 2.7.7) and preserve all configuration files either the databases with the old one?

    Yes, you can do that. Make a backup of the files first though.

    Thread Starter r1weedee

    (@r1weedee)

    Thank you Ron, still on progress but when i set WP_DEBUG to true, i found this error

    SharDB was called incorrectly. SharDB must set a database connection for use with escaping. Please see Debugging in WordPress for more information. (This message was added in version 1024.) in /home/wwwadmin/public_html/blog/wp-includes/functions.php on line 3374

    Plugin Author Ron Rennick

    (@wpmuguru)

    That warning is probably being triggered by one of your plugins. It would help if you could identify which one.

    Duoc Nguyen

    (@nguyenvanduocit)

    I got this message, but no plugin activated

    Duoc Nguyen

    (@nguyenvanduocit)

    For who can read Vietnamese. I have a post to fix this proplem : http://wordpresskite.com/quicktip/sua-loi-escaping-trong-plugin-shardb/

    For instance, Add method _real_escape to class SharDB on file db.php. See this method here : https://gist.github.com/nguyenvanduocit/8ba2cd9ca4ba8bfca233

    I am facing the same problem. I have added that function in db.php file but still showing that error.

    Notice: SharDB was called incorrectly. SharDB must set a database connection for use with escaping.

    db-settigs.php settings
    $shardb_hash_length = 1;
    $shardb_prefix = ‘old_wordpress_’;
    $shardb_dataset = ‘wordpress’;
    $enable_home_db = true;
    $shardb_local_db = true;

    Duoc Nguyen

    (@nguyenvanduocit)

    Hi nrbtushar.
    I will load full db.php tomorow. But now, you can fix by my gist

    Hi Nguyen,
    How do I call function _real_escape( $string ) after adding that in db.php

    Duoc Nguyen

    (@nguyenvanduocit)

    This method was used by WordPress. You do not need to call this method. Just update it.

    I have added that function inside shardDB class and its working. That’s error message gone but still I have another error message.

    The mysql extension is deprecated and will be removed in the future: use mysqli or PDO

    Do you know how I can remove that?

    Duoc Nguyen

    (@nguyenvanduocit)

    I just update the method : Replace it with

    function _real_escape( $string ) {
    
        if ( is_resource( $this->dbhs['global_r'] ) ) {
            if ( $this->use_mysqli ) {
    			return mysqli_real_escape_string( $this->dbhs['global_r'] , $string );
    		} else {
    			return mysql_real_escape_string( $string, $this->dbhs['global_r']  );
    		}
        } else {
            return addslashes( $string );
        }
    }

    still I have got that error.

    The mysql extension is deprecated and will be removed in the future: use mysqli or PDO

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘wordpress 4.0 compatibility’ is closed to new replies.