Skip to content

Climb to the Stars

Stephanie Booth's online ramblings

  • Blog
    • Being the boss
    • Life Improvement
    • My work
    • Blogging
    • Personal
    • Thinking
    • Conferences
    • Connected Life
  • Random
  • Photos
  • Coworking
  • Digital Crumble
  • Pages
    • India
    • Multilingual
    • Troubles musculo-squelettiques (Repetitive Strain Injury)
    • WordPress
    • Writing
  • About
    • Presse
  • Newsletter
  • Twitter
  • Facebook
  • Work
  • Contact

Tag: wp-login

WordPress wp-login.php Problem [en]

Explanation and solution to the nasty Wordpress problem which keeps kicking you out of your admin section with ridiculously long URLs. Just a few lines to delete in a file.

[fr] La solution au problème qui fait qu'on se retrouve parfois régulièrement expulsé de la partie admin de WordPress, et qui implique des URLs d'une longueur indécente, ne menant nulle part. Il suffit de supprimer deux lignes dans wp-login.php.

Yesterday, without a warning or an explanation, my WordPress install started acting funky. Even though I was logged in, I would be faced with very very long URLs showing me a broken login page when I tried to go back to the admin section (something like http://climbtothestars.org/wp-login.php/wp-admin/wp-smilies/wp-content/wp-admin/post.php?action=edit&post=xxxx). Deleting all the cruft after wp-login.php allowed me to log in, but a few clicks later I would find myself faced again with the same nasty situation.

This is caused by a bug in wp-login.php. What happens is that the Blog URL option gets changed to that long funky line in the database, and of course, it messes everything up.

The first thing I did was correct the siteurl value in the database (options table), because I have direct access to the database and like sticking my hands in there. If you don’t have access to the database, you can probably (I’m not certain) set this right through the Options screen in the admin section for your blog. (Remember, if you feel locked out, go directly to http://example.com/wp-login.php to log in.)

There is a forum thread about this problem, but the solution isn’t presented very clearly to my taste — hence this post.

Now for the fix: if you are not going to be moving your blog around (ie, changing the blog address) without having direct access to the database, you can edit the file wp-login.php and delete a couple of lines. Open wp-login.php in your favourite text editor, and do a search for get_settings(‘siteurl’) — that will bring you to the right place in the file. Delete these lines:

// If someone has moved WordPress let's try to detect it
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'])
!= get_settings('siteurl') )
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] .
$_SERVER['REQUEST_URI']) );

I’ve had a similar problem with my Blogsome test blog — with the URL for the CSS file going all funky. It seems to be back to normal, but I’ll check that they are indeed aware of the problem.

Similar Posts:

  • Invalid argument supplied for foreach() in wp-capabilities.php: Case Cracked! [en] (2007)
  • Testing Hosted Blog Solutions [en] (2004)
  • Trying the Disqus WordPress Plugin [en] (2008)
  • Bunny's Print CSS Plugin Upgrade [en] (2008)
  • Requirements for a WordPress Installer Script [en] (2004)
  • Scripts for a WordPress Weblog Farm [en] (2004)
  • WordPress DreamHost WiFi Arghl! [en] (2006)
  • Converting MySQL Database Contents to UTF-8 [en] (2004)
  • Finally out of MySQL encoding hell [en] (2006)
  • Batch Category Editing For WordPress [en] (2004)

  • Click to share on Facebook (Opens in new window)
  • Click to share on Google+ (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pocket (Opens in new window)
Author Stephanie BoothPosted on 04.12.2004Categories WordpressTags admin, bug, delete, edit, file, forum, locked out, long, problem, security, solution, URL, Weblog Technology, Wordpress, wp-login, wp-login.php21 Comments on WordPress wp-login.php Problem [en]

Welcome!

Stephanie Booth

Climb to the Stars is Stephanie Booth's personal site. Blog powered since summer 2000. Follow her on Twitter (@stephtara), Tumblr (Digital Crumble), Facebook and Google.

Want to work with Stephanie?

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Revue: 3 links a week

Steph’s Intermittent Newsletter

powered by TinyLetter

Demande à Steph

Chaque semaine, un truc geek pour améliorer votre vie numérique. Ecrivez-moi avec vos questions!

Archives

Categories

Recent Comments

  • My Cat’s Tale – Oscar, Erica, And Living With A Diabetic Cat | My Cat's Tale on Feline Diabetes: My Advice for Diabetic Cats
  • My Cat’s Tale – Oscar, Erica, And Living With A Diabetic Cat – The Podcast Corner on Feline Diabetes: My Advice for Diabetic Cats
  • Stephanie Booth on Giardiose: ma copine giardia lamblia
  • céline on Giardiose: ma copine giardia lamblia
  • Elizabeth on Coming Out as Single and Childless
  • Denise on More About the M-DEX, and a Cool Blog: Hack and Hear
  • Ton Zijlstra on 22 Years Ago
  • Stephanie Booth on 22 Years Ago
  • Euan on 22 Years Ago
  • Xavier on Regarder passer le monde
  • Blog
    • Being the boss
    • Life Improvement
    • My work
    • Blogging
    • Personal
    • Thinking
    • Conferences
    • Connected Life
  • Random
  • Photos
  • Coworking
  • Digital Crumble
  • Pages
    • India
    • Multilingual
    • Troubles musculo-squelettiques (Repetitive Strain Injury)
    • WordPress
    • Writing
  • About
    • Presse
  • Newsletter
  • Twitter
  • Facebook
  • Work
  • Contact
Climb to the Stars Proudly powered by WordPress