1

This question already has an answer here:

A while back I made a site for our Operettic society in Holland, after a while I transferred the maintenance to another person who came just recently back at me with a problem.

The site is stuck in maintenance mode, and also the /user/login doesn't work, I also tried the ?q=user possibility, but this also didn't work.

Also made the following query to the database:

UPDATE variable SET value = 's:1:"0";' WHERE name= 'site_offline';
DELETE FROM cache WHERE cid = 'variables';

Anyone some thoughts on this?

Thanks in advance!

marked as duplicate by rooby, Krishna Mohan, Mołot, Letharion, kiamlaluno Nov 19 '14 at 9:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

If you can login with ssh on the server you could use drush to unset the maintenance mode±

drush vset maintenance_mode 0

0

I got one solution here. I faced this problem once and it worked for me. I logged in to the application by admin programmatically using below code

 global $user;
    $user = user_load(1);
    drupal_session_regenerate();
    drupal_goto('user');

Make sure to delete the above code once the site is set back from maintenance mode. Otherwise this will give administration access to any user visiting the website.

  • 2
    I would recommend you to elaborate on your answer for the sake of completeness. – Wtower Nov 16 '14 at 14:14
  • Very much so. I hope you don't intend to put that in the index.php or somewhere else that would run for any user that hits the page. – rooby Nov 17 '14 at 5:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.