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.

3 Answers 3


That occurs because Drupal can't connect to its database. Ensure you have the settings.php file in the sites/default folder. The settings.php file must be readable by the account used to run the web server; it must contain valid database connection string credentials for that server. Make sure that $base_url in that file is either commented out (as it is by default), or it's a valid URL for that domain.

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

Also, make sure you run update.php and clear all the caches, whenever possible.

  • 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
    Commented Jan 8, 2013 at 11:17

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.


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.


  • Thank you Sai. I have spent hours on this and your solution worked for me.
    – Ron Raney
    Commented Sep 24, 2021 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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