What could be causing drupal to want to reinstall itself after I clear cache? 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.
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.