5

I am trying to update Drupal from 7.17 to 7.18. I uploaded a copy of my site from a test server to my production server. Everything installs fine, I actually see the site working, and I can navigate it. Then, as soon as I perform updates on modules and core, I run database updates, and then the site automatically navigates me back to install.php to reinstall the site from scratch. I have tried to reinstall the site several times from scratch, manually and using Drush.

What is the mechanism that determines to redirect to install.php? How can I determine how and why this is happening?

Even though the install.php page is showing up in the browser, drush status shows that the site is up, running, successfully connected to the database with correct theme. According to Drush, everything is working properly.

7

That occurs because Drupal can't connect to its database

Ensure you have:

  • settings.php

in your Drupal /sites/default folder.

settings.php must be readable by the webserver user and contain valid database connection string credentials for that server. Make sure the base_url is either default commented out or valid for that domain.

See _drupal_bootstrap_database for the place where the install.php redirect occurs.

Also, make sure you've run update.php and do clear all caches if possible.

|improve this answer|||||
  • All the files are in the correct place. Remember, I can upload the site and actually use it before I do updates. As soon as update db is finished running, the site redirects back to install.php. In an attempt to make sure my settings.php file was not corrupted, I also deleted the defaults directory and installed a fresh copy from a new d7 download. same issue. In a last ditch effort, I chmod'ed 777 the entire drupal install. nothing. – blue928 Jan 8 '13 at 11:17
2

Just to add, after my site (D7.23 on Ubuntu 12.04.3) randomly decided it needed to be installed again, I found out that an archive process had changed the permissions on the sites/default directory to 755.

At first I didn't think it was this because the change in permissions was less restrictive i.e. giving user and group more permissions; but I guess there is a security check somewhere in Drupal that will only accept the sites/default if it has the permissions 555 — the thinking being that the folder may have been tampered with. The same also seems to be true for settings.php in that my install requires it to be 444, if not, I get the install UI.

|improve this answer|||||
0

I found the solution to this issue. See the solution given by bryancasler on the page https://www.drupal.org/node/984112

How to fix this problem

  • Go to xampp\mysql\bin
  • Open my.ini
  • Change "max_allowed_packet from 1m to 16m
  • Save my.ini

Now restart MySql through the XAMPP control panel.

Thanks.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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