• Resolved itconsultingnv

    (@itconsultingnv)


    Prior to the 2.5.1 upgrade I had two blogs running within the same database using a different prefix (the standard wp_ and another int_) … I had modified the wp_settings.php file to reflect the following changes…

    // Table names
    $wpdb->posts = $wpdb->prefix . ‘posts’;
    $wpdb->users = ‘wp_users’;
    $wpdb->categories = $wpdb->prefix . ‘categories’;
    $wpdb->post2cat = $wpdb->prefix . ‘post2cat’;
    $wpdb->comments = $wpdb->prefix . ‘comments’;
    $wpdb->link2cat = $wpdb->prefix . ‘link2cat’;
    $wpdb->links = $wpdb->prefix . ‘links’;
    $wpdb->options = $wpdb->prefix . ‘options’;
    $wpdb->postmeta = $wpdb->prefix . ‘postmeta’;
    $wpdb->usermeta = ‘wp_usermeta’;
    $wpdb->terms = $wpdb->prefix . ‘terms’;
    $wpdb->term_taxonomy = $wpdb->prefix . ‘term_taxonomy’;
    $wpdb->term_relationships = $wpdb->prefix . ‘term_relationships’;

    This allowed our internal blog to use the same users table from our main public blog installation. This all worked great until the recent update to 2.5.1.

    After the upgrade my internal company blog would not allow any users to access the wp-admin space and the shared admin user would not log-in. I realized that the internal blog was not linking to the shared users table using the wp_ prefix. After much research I found that wp_settings no longer houses the prefix information and have been searching for the proper method to make this work.

    Unfortunately I can no longer even access the wp-admin space for our internal blog as I never configured (or forgot) the old admin password I initially used for this installation. Actually I don’t think I ever set up the admin user in the int_ table as I had immediately configured both blogs to use the same user database.

    I have two requests for assistance.

    First, is there a way to easily accomplish the shared user login under 2.5.1 so that both my blogs within the same db can use shared user logins?

    Secondly, if this cannot be accomplished (or in the mean time at least) is there a way to reset the password for my admin user under the alternate installation. More background on this: I have tried to ‘request’ a password change from the blog that is not allowing entry and it does email me a reset password email. However when I attempt to use the link to reset the password the internal blog states the following…

    Sorry, that key does not appear to be valid.

    It still gives me the option to reset the password but it never takes it, or doesn’t work.

    Is there a way to manually reset the admin password within MySQL so I can at least get into the backend of the offending blog and manually add users for temporary access?

    As a followup I have tried modifying the code in the wp_db file with the following code changes…

    At or about line 105 I added the following two lines of code after

    foreach ( $this->tables as $table )
    $this->$table = $this->prefix . $table;

    Added code…
    $this->users = ‘wp_’ . ‘users’;
    $this->usermeta = ‘wp_’ . ‘usermeta’;

    This, I hoped, would tell the internal blog to use the main wp_ prefix tables for user access data. Wala, something did change. Unfortunately, I receive the following error when attempting to log in to the site with this mod in place.

    After attempting log-in (and it took the user data)… I get the following error within my browser…

    You do not have sufficient permissions to access this page

    So. It appears to be now allowing access (somewhat) by using the main (public) blogs user credentials however those credentials are not being given privileges over the internal blogs admin interface.

    Anyone having the same issue, find resolution on the issue, etc? I have a desperate need to allow access to the internal blog and would really like to continue using a shared user table for access to the many blogs this domain creates.

    Thanks in advance!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Multiple Blogs Using Same DB for Users in 2.5.1’ is closed to new replies.