Login crashes on Roles error (2 posts)

  1. JohnW
    Posted 9 years ago #

    Installed; everything looked good. Tried to login and got a
    "Warning: Invalid argument supplied for foreach() in [webroot]\wBlog\wordpress\wp-includes\capabilities.php on line 19
    You do not have sufficient permissions to access this page."

    This is on a local installation (my computer, running PHP 5.05 on Apache 2x), so "permissions" have no meaning.

    In passing, I note that on this site, I have seen a number of pages that don't seem to render properly with my Firefox 1.5 version.

  2. Austin Matzko
    Posted 9 years ago #

    Sounds like WordPress is having difficulty finding the list of user roles, which should be stored in the wp_options table.

    One way this problem can happen is if you change your table prefix after installing WordPress, because the table prefix is part of the option_name for the user roles value.

    In other words, if your table prefix is 'wp_mysite_', then your user roles should be stored in the options table under 'wp_mysite_user_roles'.

    You can find what your user roles are named by running this query in your MySQL database:

    SELECT * FROM wp_options WHERE option_name LIKE '%user_roles';

Topic Closed

This topic has been closed to new replies.

About this Topic