WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "You do not have sufficient permissions to access this page." (94 posts)

  1. tsmori
    Member
    Posted 8 years ago #

    Maybe it's me, but I wouldn't call this issue resolved. Something is happening during the update process that really borks things up.

    I had the same issue, where, for some reason, my normal username/password for mysql didn't work, i.e. when I hit the upgrade.php page, I got a slew of error messages stating that I couldn't connect. So, I switched the login to the root login and the update worked. Strangely, I could log into mysql via the command line using the "bad" account without any problems.

    Also, there isn't one definitive FIX for this issue. I used ghacks fix, switching the wp_capabilities value to {a:1:{s:13:"administrator";b:1;}. There are a few misleading posts here as well. Do I need to make the changes to .htaccess? Who knows. No one has said if that's necessary. And is the large entry mentioned by brunovernay for wp_capabilities necessary? Using only "{a:1:{s:13:"administrator";b:1;}", I'm not seeing any further problems.

    And finally, artisan949 mentions using this in the wp_options table, which has to be wrong as the field names do not match.

  2. spagornasm
    Member
    Posted 8 years ago #

    I agree... I've tried several of the "fixes" mentioned, and they're either too complex or they don't fully address the issue. This needs to be marked "unresolved," or at least have some memeber of the development team step in and state definitively what's going on so we're not all hacking out our databases. An upgrade should not break your blog.

  3. moikirsch
    Member
    Posted 8 years ago #

    The problem is related to the upgrade process of the database and the data.

    I'll try to see if there is a way to "FORCE" the upgrade once more.

  4. moikirsch
    Member
    Posted 8 years ago #

    HOW TO FIX THIS:

    Go to your wordpress installation and open wp-include/version.php

    Comment both lines:


    // $wp_version = '2.0.2';
    // $wp_db_version = 3437;

    In a browser open

    http://www.yourblog.com/path_to_wp/wp-admin/upgrade.php

    Follow the instructions.

    I hope this helps.

  5. iceman42
    Member
    Posted 8 years ago #

    I have the same problem only it occurs on a new install. I have successfully installed WP 1.5, this was my first install using the newer version, and its a new site so no upgrade. I've been going through and doing each of the hacks and none seem to work. I have redownloaded and reinstalled at least 3 times.

    Any other thoughts.

  6. Mark Jaquith
    WordPress Lead Dev
    Posted 8 years ago #

    Someone wandered into WordPress with this problem. The usermeta table was created, but was empty.

    I wrote this script, and it fixed his problems:
    http://txfx.net/files/wordpress/force-upgrade.phps

    As the name implies, it forces an upgrade (the upgrade_160() for all the 1.5 => 2.0 stuff).

    It won't fix every situations, but it'll likely fix situations where people just need to force the upgrade.

  7. Mark Jaquith
    WordPress Lead Dev
    Posted 8 years ago #

    Bah... usage:

    Click "download" and save as force-upgrade.php and place it in your root WP directory. Access it via a browser. Delete it after it has run.

  8. iceman42
    Member
    Posted 8 years ago #

    The force upgrade script didnt work for me. Anyone know where i can get an old copy of 1.5. IMO the newer version isnt worth it.

  9. MichaelH
    Member
    Posted 8 years ago #

    Archive copies are available for download at http://static.wordpress.org/

  10. vide
    Member
    Posted 8 years ago #

    Import db backup in the new empty db and have same msg.

  11. candv
    Member
    Posted 7 years ago #

    Has anyone found a solution? I'm still stuck with v2.0 and can't upgrade...

  12. fsamuel
    Member
    Posted 7 years ago #

    This just happend to me today, after it worked fine. I didn't do any changes to my sitem and all of a sudden i get this message. Could it be a problem on the server side ?

  13. kennemore
    Member
    Posted 7 years ago #

    This issue is not resolved.

    When performing a new, clean installation, I've had the permissions problem on different systems. It partly has something to do with 'roles' in 'capabilities.php'.

    If you look at your wp_options (or whatever prefix you have) table, you'll see that the option_value for the capabilities are set, but without a option_name present. This option name is supposed to be called from capabilities.php as a WP_Roles class as $this->role_key...

    This is only part of the issue I'm having, though, because of the dependency on these functions -- I'm still stuck with permissions problems.

    Anyone have a patch?

  14. candv
    Member
    Posted 7 years ago #

    I'm stuck at 2.0 and can't upgrade because of this very problem. Is there anyone that can help?

  15. Jasko
    Member
    Posted 7 years ago #

    Hello folks!

    I have had the same problem with categories.php and by reading in this thread: http://wordpress.org/support/topic/52806 I found the solution. I would recommend everyone reading this thread and not getting their problems solved read this thread because it has several other relevant suggestions for solutions.

    The solution to the problem with categories.php, seems to be found in the php.ini where "magic_qoutes_runtime" should be set to "Off". It certainly worked for me.

    I hope this can help others solving their problems.

  16. kellysh
    Member
    Posted 7 years ago #

    I too am getting the "You do not have sufficient permissions to access this page" error and this occured after my hosting moved servers. Odd that it happened because it worked perfectly fine earlier today and then when I tried to log into my blog I got the error and only part of my blog shows. On the previous day I published a post that readers commented on and then it just disappeared as if it didn't exist.
    Can some please explain in plain non-technical terms what's causing this and how it can be resolved?
    Thanks.

  17. iceman42
    Member
    Posted 7 years ago #

    kennemore and candv I echo your comments, I have three new WP sites waiting and 2 to upgrade and I am sitting here with a permissions issue and its been this was for a while.

  18. iceman42
    Member
    Posted 7 years ago #

    I went digging and digging and then digging somemore, and I ran into an issue that I had seen before. I made some changes to the httpd.conf and had to restart apache, and for several minutes my issue went away. So I went into my php.ini file and disabled mmcache, and presto it worked.

    If you have mmcache or some other extensions loaded with php you might want to check and disable them and see if it changes. You can do this in one of three ways.

    Directory directive in httpd.conf,
    <Directory '/some/path/to/wordpress'>
    php_admin_value mmcache_enable 0
    php_admin_value mmcache_optimizer 0
    </Directory>

    PHP.ini file just comment out or turn mmcache.enable='0' and mmcache.optimizer='0'

    Also do something similar with .htaccess
    php_admin_value mmcache_enable 0
    php_admin_value mmcache_optimizer 0

    You might say but I dont have mmcache installed or whatever, but this should show some of those struggling that there might be something other then WP to blame for the issue, and it might be something that you have to play with in Apache or PHP.ini.

    HTH

  19. candv
    Member
    Posted 7 years ago #

    Iceman42, my host won't allow me to amend those file. Any other ideas out there?

  20. ophy
    Member
    Posted 7 years ago #

    I have just changed the options of the Brian threaded comments [ http://meidell.dk/archives/2004/09/04/nested-comments/ when appear this message:
    Cheatin' uh?
    when I tried to go to the plugin options the message was:
    You do not have sufficient permissions to access this page.
    I read all this thread and tried some suggestions but my website http://www.nelshael.com is still down T_T
    I'm waiting for other any ideas about this problem.

  21. allie12
    Member
    Posted 7 years ago #

    Ghacks, I tried your fix and not only did it not work, but now I've lost my ability to work in my profile as well. previously, I was able to see my dashboard and profile but now only the dashboard remains.

    I've also tried the tweaked fix, and that didn't work either.

    I've also renamed my plugin folder, hoping that would help, but again, no go.

    I also deleted my cache folder and re-upgraded.

    I'm on version 2.0.3 and I was having this problem BEFORE upgrading. I upgraded hoping it would fix it.

    What else can I try?

  22. st0kk
    Member
    Posted 7 years ago #

    I got the problem after upgrade from 2.0.3 -> 2.0.4
    The server is running in php_safemode

    Qurious about how to fix this.
    The plugin im trying to use again is organizer
    Disabled b4 upgrade
    Enabled after upgrade with this error
    "You do not have sufficient permissions to access this page."

  23. candv
    Member
    Posted 7 years ago #

    How is this topic resolved? I'm still stuck at 2.0 and haven't been able to upgrade to fix any security issues that have been covered since 2.0.4

  24. KerimFriedman
    Member
    Posted 7 years ago #

    I finally fixed the problem.

    There doesn't seem to be any clear explanation here of what is happening, so I'll try to explain it as I understand it.

    When some people upgrade (or perhaps do a fresh install) for some reason or another some crucial tables are not being properly updated. In my case, I did an upgrade, and three tables were not updated. I had to manually add insert new data to get my WP install to work.

    All of the data that is missing relates to the new permission system. I strongly suspect that for people who skipped a version or two of WP, these tables are not being properly updated by upgrade.php, as I had no problem with WP installs where I have been doing regular updates. I think this is a bug and should be fixed.

    There are two tables and three rows of data I had to manually insert.

    The first table is the wp_usermeta table. You want it to look exactly like this (mine was empty!):

    http://www.tamba2.org.uk/wordpress/admin/

    The second table is the wp_options table. You need to add a new option called "wp_user_roles" which is not being created properly. There are only two things you need to change when you insert a new row into this table. First, "option_name" should be "wp_user_roles". Second, the "option_value" should be set to the following very long string of text:

    a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:30:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:19:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:8:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:4:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}

    Once you have made those changes, you should be able to log in to your WP-Admin and manage your blog as normal.

  25. kisvahur
    Member
    Posted 7 years ago #

    Hi, sorry about my terrible English.
    Just updated to 2.0.3 and got this problem. Looking at usermeta MySQL table (I'm not using the wp_ table prefix) found two prefixed meta_keys for admin user (user_id=1): wp_user_level and wp_capabilities (meta_value was correct). After renaming these keys to user_level and capabilities
    (without prefix) the problem resolved.
    I hope, this helps.

  26. kennemore
    Member
    Posted 7 years ago #

    RESOLVED:

    This issue has to do with Turck MMCACHE being enabled in PHP. (Check your 'php.ini' or 'php.d/mmcache.ini' files).

    Since part of the PHP loads are performed without some variables set (and then cached), when they are loaded from MMCACHE on the subsequent load, the variables are not present for some of the functions to create the entries in the database.

    Disable MMCACHE and flush it, or disable and wait X hours...

  27. stellagator
    Member
    Posted 7 years ago #

    Where is this php.ini!?

    Oh god, I'm confused.

  28. skst
    Member
    Posted 7 years ago #

    pjh, I just wanted to say thank you for your solution (on the previous page). My situation was that I'd renamed my tables and didn't know I had to modify some of the values. Thanks!

  29. daveknoll
    Member
    Posted 7 years ago #

    i tried all of above and nothing worked. i did find that the table they are talking about was empty. i tried all the hacks to no avail.

    finally, i restored my old db, wiped my install directory and installed 2.0.5 (hours fresh). i then copied my wp-config.php and wp-content additions and ran upgrade.php. came up clean!!! word to the wise - heed that warning in one of the tip pages - start with a clean install, do not install over the old directory as suggested.

  30. veresch
    Member
    Posted 7 years ago #

    Ok, so the post by KerimFriedman is what led me to the solution of this problem. However my problem was that i migrated the website from windows to Linux host and as you may know Linux is case sensitive. my folders begin with prefix eq_ (lowercase) however if i did

    select * from eq_usermeta

    the meta_key values would look like this: EQ_user_level and EQ_capabilities. So i changed these from EQ_ to eq_ and everything started working fine for me after that. Here is what i ran:

    select * from eq_usermeta;
    update eq_usermeta set meta_key = 'eq_user_level' where umeta_id = 4;
    update eq_usermeta set meta_key = 'eq_capabilities' where umeta_id = 5;
    select * from eq_usermeta;

    Thanks everybody for contributing!

    -Alexi
    --------------------------------
    http://www.HorseOnSale.com - a place to sell and buy horses!

Topic Closed

This topic has been closed to new replies.

About this Topic