Drupal maintenance mode scare

When I was upgrading from 6.12 to 6.13 on one of the sites I maintain accidentally locked myself out of the site! I was following the usual procedure to upgrade the Drupal, or at least I thought I was, except that I forgot to change the default theme to Garland. To make matters worse, after I uploaded the new 6.13 files I realized I couldn't run the update database scripts because I was not user 1. So, of course I logged out to get into user 1 and found that I couldn't log back in. I couldn't log back in using the standard /user path because the custom theme for the site did not handle user login correctly when in maintenance mode. So I was stuck not being able login to the site.

Luckily I was quickly able to find some help using Google. It was basically as easy as changing a value in the Drupal database, however, I also needed to clear the database cache because my site was using caching. In the end I was able to get myself logged in after putting the site back online. Here are the SQL commands I used to turn the site back online.


UPDATE variable SET value='s:1:"0";' WHERE name='site_offline';
TRUNCATE TABLE cache;
TRUNCATE TABLE cache_content;
TRUNCATE TABLE cache_page;

Thanks!

I had the same problem and your code fixed it... although I had to remove the cache_content line because apparently that table doesn't exist anymore. Cyber-five for you, my friend! :)

Thanks a lot, I had the same

Thanks a lot, I had the same problem and I did get scared...

THANX A BUNCH!!!

I used ur code and it saved my LIFE.... thanx alot...