WordPress.org

Ready to get started?Download WordPress

Forums

2.7.1 --> 2.8 = You do not have sufficient permissions to access this page. (6 posts)

  1. hughes03
    Member
    Posted 5 years ago #

    I currently have two websites online:

    • justasktheitguy.com
    • gearsofwaraddicts.com

    Last night I decided to update them both to WP 2.8 upon the release. After the release, I ran into an array of problems. First up, the justasktheitguy.com site now refuses to show the dashboard page. If I change the URL to /wp-admin/edit.php or something, it works fine but the dashboard shows blank. I have read this could be caused by a plugin and that I should try disabling them until I find the correct one. I'll try that and hopefully that will work.

    My second issue and main issue is with gearsofwaraddicts.com. Both of these sites share the user table wp_users. They reside in the same database using different prefixes, gwa_ for gearsofwaraddicts.com and wp_ for justasktheitguy.com. In the gearsofwaraddicts.com wp-config.php file I have entered:

    define('CUSTOM_USER_TABLE', 'wp_users');
    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

    Up until now, this allowed the users tables and permissions to be shared without issue. However, after the upgrade, if I login on the gearsofwaraddicts.com site I am greeted with a message saying
    You do not have sufficient permissions to access this page.

    In playing with the tables and stuff I discovered that if I removed the above code, allowing the site to use the gwa_ table then it worked perfectly fine, minus the fact that most of my users no longer existed. (I used the gwa_ table for a short while before merging them so I have 3 users in that table)

    I also tried renaming gwa_users & gwa_usermeta to wp_users & wp_usermeta after putting the code above back. After that, gearsofwaraddicts.com worked but then justasktheitguy.com threw the permissions error.

    Lastly, I set both to use their own user tables and created one new user on both to compare data. I had previously compared the tables' data but assumed that perhaps I had overlooked something. Below is the data that was entered on both.

    gwa_users:

    ID: 8
    user_login: admin1
    user_pass: (big long thing)
    user_nicename: admin1
    user_email: admin@widgt.com
    user_url:
    user_registered: 2009-06-11 04:55:39
    user_activation_key:
    user_status: 0
    display_name:

    wp_users:

    ID: 125
    user_login: admin1
    user_pass: (big long thing)
    user_nicename: admin1
    user_email: admin@widgt.com
    user_url:
    user_registered: 2009-06-11 04:52:00
    user_activation_key:
    user_status: 0
    display_name:

    gwa_usermeta: (for user_id = 8)

    nickname: admin1
    rich_editing: true
    comment_shortcuts: false
    admin_color: fresh
    gwa_capabilities: a:1:{s:13:"administrator";b:1;}
    gwa_user_level: 10

    wp_usermeta: (for user_id = 125)

    nickname: admin1
    rich_editing: true
    comment_shortcuts: false
    admin_color: fresh
    wp_capabilities: a:1:{s:13:"administrator";b:1;}
    wp_user_level: 10

    This one has me stumped so any help in this matter would be greatly appreciated. I tried to be as descriptive and include as many details as possible but if anyone has any suggestions of what else to check, please let me know.

    Thanks in advance!

    -Ryan

  2. nemoprincess
    Member
    Posted 5 years ago #

    Hi,
    have you solved? I have the same problem. Thanks

  3. What_A_Legend
    Member
    Posted 5 years ago #

    I got this issue too since upgrading. Kind of annoying. Cannot access my admin panel for one of my sites.

    I can access the admin side of the site that initially uses the database but the table which is shared on the other site does not work.

  4. nemoprincess
    Member
    Posted 5 years ago #

    I find a solution.
    In EVERY WordPress Installation, in wp-config.php you have to add:

    define('CUSTOM_CAPABILITIES_PREFIX', 'wp_');

    just under the line: define('CUSTOM_CAPABILITIES_PREFIX', 'wp_');

    Then you have to find in wp-includes/capabilities.php the line:

    $this->cap_key = $wpdb->prefix . 'capabilities';

    and replace it with

    if (defined ('CUSTOM_CAPABILITIES_PREFIX')) {
    	$this->cap_key = CUSTOM_CAPABILITIES_PREFIX . 'capabilities';
    	}
    	else {	$this->cap_key = $wpdb->prefix . 'capabilities';
    	}

    That' s all! Good luck!

  5. scfarmvoice
    Member
    Posted 4 years ago #

    I have added the above code but it still provides me with the access error message. My database name does not have the prefix wp_ but my table names with the appropriate permissions do have the prefix wp_. Does that capability point to the table name or the database name?

  6. aweswebs
    Member
    Posted 4 years ago #

    Worked Great! Just what I was looking for!

Topic Closed

This topic has been closed to new replies.

About this Topic