• Ok, migrated my DB, made changes, refreshed my install of WP — all because I was tired of hackers & couldn’t find the backdoor they were using. I even wiped the directories & all files from the site before attempting a reinstall…

    However, now I get the following error when attempting to login to the admin screen:

    “You do not have sufficient permissions to access this page.”

    My password is *not* incorrect, and the password matches what I see in MySQL. It’s not logging in that appears to be the problem — there’s something wrong with the permissions of SOMEthing, but I cannot tell exactly what that could be. Too many similar issues and none of them seem to be related to mine…

    HALP!
    ~CM~

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter xionmac

    (@xionmac)

    FIXED!!!

    Created a “force-upgrade.php” file (see code below), uploaded it to the same directory as “wp-config.php” and opened the former in a web browser — BINGO!!!

    <?php
    /*
    WordPress Force Upgrade Script
    Copyright (C) 2006  Mark Jaquith
    
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License
    as published by the Free Software Foundation; either version 2
    of the License, or (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    */
    
    function txfx_log($text) {
    	echo $text . '<br />';
    }
    
    switch ($_GET['step']) :
    	case "1":
    		require('wp-config.php');
    		txfx_log('WordPress loaded...');
    		require('wp-admin/upgrade-functions.php');
    		txfx_log('Upgrade functions loaded...');
    		wp_cache_flush();
    		txfx_log('Object cache flushed...');
    		make_db_current();
    		txfx_log('Database made current...');
    		upgrade_160();
    		txfx_log('Data upgraded...');
    		$wp_rewrite->flush_rules();
    		txfx_log('Rewrite rules flushed...');
    		wp_cache_flush();
    		txfx_log('Object cache flushed...');
    		txfx_log('<br />');
    		txfx_log('Hopefully that did it!  <strong>DELETE THIS FILE FROM YOUR SERVER NOW!</strong>');
    		txfx_log('And then, try to access your <code>/wp-admin/</code>');
    		break;
    	default :
    		txfx_log('This script will attempt to upgrade your database.  It is intended for users of WordPress 1.5 or later.');
    		txfx_log('<strong>You should delete this script from your server after you are done using it!</strong>');
    		txfx_log('<br />');
    		txfx_log('<a href="?step=1">Click here</a> to attempt the upgrade');
    		break;
    endswitch;
    ?>

    FIXED and FOUND the CAUSE!

    I’ve been busting my chops on this for ages…

    I download and install Live WP Sites for working on client sites on my local server on different URL’s etc without issue… until now.

    Everything looked just fine in the DB, config files etc… It wasn’t all the “obvious” things that can cause this…and this little script brought the Admin back to life!

    So Thanks a ton xionmac! You are a champ for finding that and also thanks to Mark Jaquith for coming up with the script. It got me back to a working point.

    In my case it was something in the DB as I can recreate the problem by reloading it.

    In the wp_user_roles entry in the wp_options table, it turns out that there were a number of Linefeeds ( LF ) and that was upsetting the world! This must have occurred in the Export and or the Editor I was using… Making the entry a single line fixed the exported version!

    I’m guessing I’ll have a few more LF friends in some other entries but at least It’s now glaringly obvious as to what was happening.

    Cheers
    Tim

    Just an update…

    I was using KATE which chops long lines which caused the issue.

    Modifying the SQL File with GEDIT – which doesn’t chop long lines – worked a treat.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permissions Fail; wp-admin login issues’ is closed to new replies.