0

I have Apache/MySQL/PHP installed and working, I've imported the database and called it stove and have updated the settings.php file in sites/default/ to use my database's name, username, and password. The hosts and vhosts are all set up correctly as well, pointing to 127.0.0.1 and the proper directories.

Any ideas on why it keeps trying to re-direct me to the install.php

Here is the snippet of code from settings.php for the database:

/* Database configuration format:
 * @code
 *   $databases['default']['default'] = array(
 *     'driver' => 'mysql',
 *     'database' => 'databasename',
 *     'username' => 'username',
 *     'password' => 'password',
 *     'host' => 'localhost',
 *     'prefix' => '',
 *   );
 *   $databases['default']['default'] = array(
 *     'driver' => 'pgsql',
 *     'database' => 'databasename',
 *     'username' => 'username',
 *     'password' => 'password',
 *     'host' => 'localhost',
 *     'prefix' => '',
 *   );
 *   $databases['default']['default'] = array(
 *     'driver' => 'sqlite',
 *     'database' => '/path/to/databasefilename',
 *   );
 * @endcode
 */
$databases['default']['default'] = array(
    'driver' => 'mysql',
    'database' => 'stove',
    'username' => 'root',
    'password' => '',
    'host' => 'localhost',
    'prefix' => '',
);
8
  • Are you sure you've updated the database settings in the right place? A constant install redirect would suggest Drupal can't find them, or doesn't have read access to settings.php
    – Clive
    Aug 20, 2013 at 14:58
  • Yes I'm sure. I made sure they are in sites/default/settings.php
    – CR47
    Aug 20, 2013 at 15:15
  • See comment on answer below; what you're describing is exactly what would happen if Drupal can't find the DB settings in settings.php. In fact, I think that's the only scenario it can happen in
    – Clive
    Aug 20, 2013 at 15:16
  • Check file permissions to make sure Apache can read your settings file. Aug 20, 2013 at 15:16
  • @ScottJoudry I went as far as to set permissions on settings.php to 777 and still get redirected to install.php
    – CR47
    Aug 20, 2013 at 16:46

2 Answers 2

1

Some of what was said was correct for this issue. Going through the install process would have been correct, however the install.php page was not loading because when I had gone through the install process on the previous server, acquia dev desktop had deleted the install.php.

The fix was to take my sites folder and put it into a freshly extracted Drupal directory (so that the install pages were all there), update settings.php to correct database info, then go through the install process, and finally drop the tables and import the back up of the database with the information I needed.

Another note: Acquia dev desktop will add the database settings to the BOTTOM of settings.php which can be easily missed. If you're developing on Windows for whatever reason, I recommend using a virtual machine. WAMP is wonky with some Drupal modules and Acquia Dev Desktop can be hassle when trying to migrate Drupal sites so having a *nix VM can be very useful.

0

I know it sounds dumb, but just try this. Go ahead and go through the installation process. When you get to the Database settings, enter in the info for the database. If the database is correct, you should get a screen that says, "There's seems to be a site already here. Either clear out the database and try again, or see your site now." with a link.

7
  • I can't, I get redirected to the install.php in the URL for the browser but it just says it doesn't exist.
    – CR47
    Aug 20, 2013 at 15:14
  • You wouldn't get that far if there were already discoverable database settings in settings.php, you'd either go straight to the site or to an error page if the db server is out of reach
    – Clive
    Aug 20, 2013 at 15:14
  • @CR47 Take a copy of a settings.php file that you know works, for any Drupal site, and use that as the base for your new one. At the moment it's pretty much certain you've just put those details in the wrong place in settings.php
    – Clive
    Aug 20, 2013 at 15:15
  • @Clive I have done as you suggested and still get re-directed to install.php I put the info for the database directly under the database config example in settings.php I will update my question with the quoted text.
    – CR47
    Aug 20, 2013 at 16:50
  • That's not true, @Clive. I've see this more than once when moving existing sites around. Aug 20, 2013 at 18:48

Your Answer

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

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