I just tried to install the latest HEAD version and got the following error message on http://localhost/d7test/install.php?q=install.php&profile=standard&local...
Warning: Invalid argument supplied for foreach() in Database::parseConnectionInfo() (line 1463 of D:\www\d7test\includes\database\database.inc).
See the attached screenshot. Other info on that page:
Web server: Apache/2.2.11 (Win32) PHP/5.2.11
PHP: 5.2.11
PHP register globals: Disabled
PHP extensions: Enabled
Database support: Enabled
PHP memory limit: 128M
File system: Writable (public download method)
Unicode library: PHP Mbstring Extension
Settings file: The settings file does not exist.
After copying default.settings.php to settings.php, the installer continued to the next page. I suspect that the "Invalid argument..." warning was caused by the fact that settings.php was not present. However that error should not be shown because the overview already shows that "The settings file does not exist".
| Comment | File | Size | Author |
|---|---|---|---|
| #32 | drupal.jpg | 56.77 KB | farneville |
| #27 | database_info_is_array.patch | 734 bytes | marcvangend |
| #25 | 753754-databaseInfo.patch | 1.89 KB | Garrett Albright |
| #22 | 753754-databaseInfo.patch | 1.8 KB | Crell |
| #20 | 753754-20.patch | 1.8 KB | Crell |
Comments
Comment #1
marcvangendBy the way, I think this is critical, we should not ship with a huge usability WTF like this in the install process.
Comment #2
Crell commentedHm. It should just be a matter of adding an if (is_array())) somewhere. Odd that it hasn't cropped up before. Agreed on the critical.
Comment #3
marcvangendYes, a simple if-statement should be enough. Unfortunately, I don't quite understand what's going on in parseConnectionInfo(), especially the part where it says
if (!is_array(self::$databaseInfo)) { self::$databaseInfo = $databaseInfo; }.I would add
if (is_array($databaseInfo)) {right before the first foreach, but I'm not sure where to close the if-block.Comment #4
yoroy commentedsubscribe :)
Comment #5
marcvangendYoroy (and everybody else): also see #753764: Duplicate and incorrect error messages during install, which is not about the php causing this error, but about the stunning ugliness and confusing messages on this page.
Comment #6
Garrett Albright commentedThis seems to fix it.
Comment #7
Garrett Albright commentedHmm… While I'm at it, is it proper that we're using camelCase for $databaseInfo here when it's not an object property? Here's another patch which fixes that if not.
Comment #8
aspilicious commented#6 and #7 are fine and will kill the warning, I don't know which one follows standards
Comment #9
Crell commentedI believe Garrett is correct. #7 it is. Passes bot, looks right to me, with one exception. The first foreach() indentation is messed up for some reason.
Garrett, please fix that and repost, and just set it to RTBC. Let's just get this resolved. :-) Thanks!
Comment #10
Garrett Albright commentedCrell, sorry, but I don't see any difference in indentation… Can anyone else see it?
Comment #11
Crell commentedMaybe it's a tab character? The first foreach was indented an extra few spaces when I looked at the patch in my browser.
Comment #12
marcvangendShouldn't this be changed to "Merge the new $database_info into the existing."?
Comment #13
Crell commentedAhso. Yes it should be. Good catch!
Comment #14
EvanDonovan commentedPatch #7 fixes the error for me. Can someone please re-roll with the code style fix? As one who often forgets to do that default.settings.php -> settings.php step, this was freaky to me.
Comment #15
yoroy commentedFixing the comment as pointed out in #12. Didn't see anything wrong with the indentation.
Comment #16
catchLooks good to me, I also can't see an indentation issue here.
Comment #18
aspilicious commentedLets try this
Comment #19
aspilicious commentedOops this one is better (hopefully)
Comment #20
Crell commented#19 is missing the fix that this thread is actually for. :-) Someone mark this RTBC please.
Comment #22
Crell commentedBah, stupid git!
Comment #24
Crell commentedThis applies just fine for me. Bot, you're a liar!
Comment #25
Garrett Albright commentedMaybe it doesn't like the stuff Git is adding in the header. (Trying to apply the patch with
patchdidn't work for me either.) Here's one made with CVS.Comment #26
dries commentedCommitted to CVS HEAD.
Comment #27
marcvangendIt looks like the patch from #19 was committed, which does contain some good changes, but not the bugfix this issue was all about in the first place (as crell also mentioned in #20). Here is a follow-up.
Comment #28
aspilicious commentedYeah I forgot the bugfix...
if #19 is committed #27 needs to be committed to
Comment #29
catchComment #30
dries commentedCommitted to CVS HEAD.
Comment #32
farneville commentedI am not sure if I am having the same issues as the others have posted here but can please someone take a look if it's related.
I am trying to test drupal and decided to install it locally on my machine but upon installation I got the attached error it is saying that settings.php does not exists on ./sites/default/ but I am certain that it is there. Any help would be appreciated...
Comment #33
marcvangend@farneville: That is not what this issue is about. I advise you to search for another topic that is related, or else start a new one.
Comment #34
Richard Barry commentedI tried to install Drupal 7 on Win 7 (32) Prof using WAMP 2.0i and I get a pink warning "Default settings file The default settings file does not exist. The Drupal installer requires that the ./sites/default/default.settings.php file not be modified in any way from the original download. "
Followed by (in green)
Settings file The ./sites/default/settings.php file exists.
Settings file Settings file is writable.
Frustrating and inconsistent.....
If this issue has been fixed, suggest that this thread gets a link to the fix page.
Comment #35
marcvangendRichard, that is not what this issue was about. I suspect that you renamed default.settings.php to settings.php, while you are supposed to copy it. If the information provided by the installer was frustrating, inconsistent, or otherwise not good enough for you, please open a new issue to improve that (I'll help if you send me the link). Your usability feedback is very welcome.
Comment #36
Richard Barry commentedThanks - fixing the "default.settings.php to settings.php" issue got me past that problem.