the following docs from default.settings.php don't seem to match the behaviour of the installer:

 * For a single database configuration, the following is sufficient:
 *
 * $databases = array(
 *   'driver' => 'mysql',
 *   'database' => 'databasename',
 *   'username' => 'username',
 *   'password' => 'password',
 *   'host' => 'localhost',
 * );
 *
 * That is equivalent to:
 *
 * $databases['default']['default'] = array(
 *   'driver' => 'mysql',
 *   'database' => 'databasename',
 *   'username' => 'username',
 *   'password' => 'password',
 *   'host' => 'localhost',
 * );

when i use the following in settings.php for a fresh install of HEAD:

$databases = array(
  'driver' => 'mysql',
  'database' => 'databasename',
  'username' => 'username',
  'password' => 'password',
  'host' => 'localhost',
);

i get the following error:

In your ./sites/default/settings.php file you have configured Drupal to use a  server, however your PHP installation currently does not support this database type.

so, is the code wrong or is the doco wrong?

CommentFileSizeAuthor
#11 databases.patch3.88 KBsmk-ka
#6 install.php_.patch748 bytesoadaeh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Status: Active » Closed (duplicate)

closing this, as it seems to be a duplicate of Select MySQL as default database driver, and fix a E_ALL warning during install.

sorry for the noise.

Damien Tournoud’s picture

Status: Closed (duplicate) » Active

This has nothing to do with the other one.

Crell’s picture

Status: Active » Postponed (maintainer needs more info)

That looks like a bug in the code, because that fallback logic is supposed to work.

I have actually been pondering removing the fancy-schmancy fallback nesting. It just burns cycles on bootstrap, and with the installer 95% of users will never write their own settings.php file anyway.

Would anyone object greatly if we just got rid of the crazy fallback stuff? I don't think it serves any purpose now that we have an automated installer.

Damien Tournoud’s picture

Crell: the fallback logic does not work in the installer, there is a:

$database = $databases['default']['default'];

in install_verify_settings()...

Anonymous’s picture

i had a look at this, its not a trivial fix. i'm totally fine with removing/simplifying the fallback code.

EDIT: and i'd be happy to supply a doc fix patch if that's the way we decide to go.

oadaeh’s picture

Title: docs in default.settings.php out of sync with code » Install.php does not correctly check the database settings
Assigned: » Unassigned
Status: Postponed (maintainer needs more info) » Needs review
FileSize
748 bytes

I think this problem can be fixed with a simple if/then conditional.

(I'm tempted to mark this as critical, because I wasted over an hour on it when attempting to do a "quick" 15 minute patch review and update.)

oadaeh’s picture

Assigned: Unassigned » oadaeh
Status: Needs review » Needs work

Okay, that wasn't enough. I'll see if I can find where else this needs to be corrected and upload a new patch.

oadaeh’s picture

The patch I provided (in #6) fixes the install problem, but doesn't fix the bootstrap problem that happens after Drupal is successfully installed. I've spent quite a bit of time following threads and have not yet been able to locate where it strays. I will have to come back to this later, as I need to leave for out appointments, unless the consensus is to just remove it.

oadaeh’s picture

I finally got back to this. (I actually forgot about it.) After rereading this thread and reliving my experiences, I agree with Crell on this issue.

oadaeh’s picture

Assigned: oadaeh » Unassigned
Status: Needs work » Active
smk-ka’s picture

Status: Active » Needs review
FileSize
3.88 KB

Let's get rid of it. The reason has been named before: manual editing isn't required anymore, which means this feature will be hardly ever used.

Dries’s picture

+1 for removing and optimizing the hell out of the bootstrap process.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Oh that is so much prettier! I just ran the Connection tests and clicked around a bit and everything runs fine. #11 is RTBC. Thanks, smk-ka!

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks for the review, Crell.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.