Hello. I'm new to Drupal. I have created a site in localhost using Drupal 7.0 with fairly standard modules (e.g. Token, Pathauto, Redirect, CKEditor, CKEdit Link and CTools, so far).

Since I'm getting close to the point at which I want to deploy the (initial, test) site via my ISP, I decided to install Drupal 7.7. I set the site into maintenance mode and took the necessary steps to upgrade (including backing up the site files and database so no doubt I can restore back to Drupal 7.0).

Drupal restarts OK but of course is in maintenance mode. However, I cannot get admin access. If I append /admin to the URL, I get error 404. I get the same error trying to use EasyPHP and phpmyadmin - backend access. /?q=admin works no better either. A somewhat superficial look at the database shows that admin and other users are still in the Drupal users table.

I'm aware of the support thread http://drupal.org/node/6696#comment-198054 which I have to say confuses me. I have tried to follow the advice to update index.php, which now reads:

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_execute_active_handler();
drupal_page_footer();
$GLOBALS['tempUser'] = $user;

This does not appear to resolve the issue.

Please can someone suggest a way forward? I can of course restore to 7.0, but without some clue as to what I've done wrong, I'm likely to repeat the same error as I upgrade to 7.7 again. Is it for example possible to use phpmyadmin and SQL commands to set Drupal out of maintenance mode?

Thanks to anyone with helpful suggestions!

Comments

ArtistConk’s picture

Have you tried logging into the site at /user ?

MarkRennes’s picture

Yes, and it doesn't work. No user name works; all give error 404.

Mark, Rennes, France (timezone UTC+1, CEST)

ArtistConk’s picture

So just to be clear, the URL you used was http://www.yoursite.com/user/login ?

Anything at /admin* will give a 404 b/c the site sees you as Anonymous.

MarkRennes’s picture

Thanks for your responsiveness!

http://127.0.0.1:8888/modules/drupal70x110605201537/ "works" and (slowly!) starts Drupal. The splash screen:

Site under maintenance
TeamKIM is currently under maintenance. We should be back shortly. Thank you for your patience.

is displayed.

http://127.0.0.1:8888/modules/drupal70x110605201537/admin/login gives:

Objet non trouvé!
L'URL requise n'a pu etre trouvée sur ce serveur. Si vous avez tapé l'URL à la main, veuillez vérifier l'orthographe et réessayer.
Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
Error 404
127.0.0.1
08/17/11 02:47:38
Apache/2.2.17 (Win32) PHP/5.3.5

Do I have explicitly to restore the MySQL database after completing the Drupal 7.7 upgrade?

Mark

Mark, Rennes, France (timezone UTC+1, CEST)

LoMo’s picture

It's /user, not /admin, that you want for logging in. Then you should be able to log in as admin and put the site back online. If that fails, you can add a line to your index.php to set the maintenance mode to "off". But then be sure to comment it out since that hack will prevent your site from being put in maintenance mode whenever you'd next need to. You can see my post, here, for more suggestions (and links) if, indeed, you are really stuck in "maintenance mode":
http://drupal.org/node/1212134

MarkRennes’s picture

Thanks LoMo.

http://127.0.0.1:8888/modules/drupal70x110605201537/user/login fails:

Objet non trouvé!

L'URL requise n'a pu etre trouvée sur ce serveur. Si vous avez tapé l'URL à la main, veuillez vérifier l'orthographe et réessayer.

Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
Error 404
127.0.0.1
08/17/11 03:19:33
Apache/2.2.17 (Win32) PHP/5.3.5

With index.php now reading:
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
variable_set('maintenance_mode', 0);
menu_execute_active_handler();
drupal_page_footer();
$GLOBALS['tempUser'] = $user;

I get the standard frontpage displayed, including a login prompt. (Thanks, that's progress!)

However, when I supply the login credentials, Drupal fails:

Objet non trouvé!
L'URL requise n'a pu etre trouvée sur ce serveur. La référence sur la page citée semble être erronée ou perimée. Nous vous prions d'informer l'auteur de cette page de cette erreur.
Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
Error 404
127.0.0.1
08/17/11 03:26:39
Apache/2.2.17 (Win32) PHP/5.3.5

Any ideas?

Mark

Mark, Rennes, France (timezone UTC+1, CEST)

Petros’s picture

Got the exact same problem!?

palwakeup’s picture

MarkRennes’s picture

Hi. Thanks, but I've already tried this;fails in the same way as all other attempts to get into my site, error 404. Exact error message is:

Objet non trouvé!

L'URL requise n'a pu etre trouvée sur ce serveur. La référence sur la page citée semble être erronée ou perimée. Nous vous prions d'informer l'auteur de cette page de cette erreur.
Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
Error 404
127.0.0.1
08/17/11 09:20:31
Apache/2.2.17 (Win32) PHP/5.3.5

The address line has been redirected to:

http://127.0.0.1:8888/modules/drupal70x110605201537/user/1

I'm forced to the conclusion that I've done something during the upgrade from D7.0 to D7.7 that has caused the database to get out of sync in some way. I have maintained all the content that I've uploaded and edited in parallel in Microsoft Word, so I'm now thinking that the best thing I can do is to reinstall and start over. Small snag: someone has hacked the Drupal installation guide! I'll raise that in a separate post.

Mark, Rennes, France (timezone UTC+1, CEST)

printery’s picture

I'm having the same problem with an upgrade from 7.4 to 7.7. I followed all the steps in the upgrade.txt file and had success on a local installation. When I repeated the same steps on a remote server, the site will only show the maintenance page and can not locate the login page. The problem still exist after I reverted the site back to 7.4.

printery’s picture

I'm not sure what I did wrong during the upgrade, but I got the site back up with the upgrade(7.7) installed.

How did I do it? Reinstalled drupal 7.7 using a different database. I dropped all the current tables in the new database, and then uploaded the tables from the backup of the original database. Everything seems to be in its place and working properly. I hope this helps.

MarkRennes’s picture

Well, it took four days, but I finally have a working localhost site on D7.7

The only snag is that, as documented elsewhere at http://drupal.org/node/1251202, I have had no success in implementing CKEditor on D7.7 (which worked fine on my earlier D7.0 site).

Mark, Rennes, France (timezone UTC+1, CEST)

bwill’s picture

I am currently developing a site on localhost with D7 and have upgraded it twice - now running 7.7. I'm not sure why you would put the site into maintenance mode while upgrading on localhost. I see why you would do so if a live site, but here are the steps I taken - straight out of the manual:

Backup site folder and DB

Clean out your Recycle Bin.

Log into the site as admin. Keep the site up in your browser - don't log off to upgrade. I actually got an error because of this. Restored and started over.

Delete all files in your website's directory except for the sites folder - this is where your settings.php, custom themes and modules reside if you have been following best practices.

Copy all the files from the new version into your website's directory - except the sites folder - you don't want to overlay this!

Open the browser session where your site is still running and go to http://localhost/website/update.php.

Did you run update.php???

The update will run, and you will get a link to go back to the home page. If you have to restore the old website files, it's easy to go to the Recycle bin and do a restore all than to copy from a backup.

CKEditor is running fine for me....

Veracious’s picture

If there were structural changes to the db you shouldn't be dumping the old tables into the new db.

I am not a drupal expert. Just getting started with my first drupal site. I need to do some more reading as I just jumped in and did the upgrade from 7.0 to 7.7 and now I am stuck in maintenance mode. I did a few updates via the admin. I saw the core update to 7.7 so I downloaded that, extracted it on top of the current site and now the site is stuck in maintenance mode. I went to example.com/update.php and I get this:
Fatal error: [] operator not supported for strings in [I redacted part of the path]modules/locale/locale.module on line 852

I created a backup first, but I would like to see if I can get around this before I restore. Any input is appreciated.

Veracious’s picture

I was having a problem on my new server PHP version 5.4.3 when I copied over the site. I had to modify the code in the locale.module to work around it. Site now working.

printery’s picture

If there were structural changes to the db you shouldn't be dumping the old tables into the new db.

I agree but the solution worked.

I never received the same error message as you did on the update.php page. When I tried to bring up that page, I'd receive the unauthorized admin message while using the authorized admin account. The strangest thing though, after trying update.php in another browser it redirected me to the install.php page.

SJourney’s picture

What a pain in the butt.

So what worked for me was (http://drupal.org/node/1212134#comment-4707292) editing index.php and adding:
variable_set('maintenance_mode', 0);

This turned off 'Maintenance mode' and I gave me a login/pass field to login. I guess I need to rollback index.php to the way it was pre-fix and see if it holds.

Drupal 7.8

LoMo’s picture

Right... I think that's the hack I suggested in the post I linked, above. It's really a last resort if you don't have another way to log in (at '/user'), but it's a solution I tested after examining the database (the variable name changed between Drupal 6 and D7). If you add anything like this, be sure to do it after the "bootstrap" and remove it or comment it out afterward.

It can make it easy to use that hack again, if you need to, if you just comment out the line. In PHP, adding a double-slash to the beginning of the line (or putting a block of code or documentation in /* and */ ) makes PHP ignore it, e.g:

<?php
/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
 */

/**
 * Root directory of Drupal installation.
 */
define('DRUPAL_ROOT', getcwd());

require_once
DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
// variable_set('maintenance_mode', 0);
menu_execute_active_handler();
?>
hankinstrio’s picture

I noticed after enabling the statistics module that I was stuck in maintenance mode. When I disabled that module everything was okay.