Hi,
when you call drupal_verify_install_file with the flag FILE_READABLE for a nonexistant, in a call by drupal_verify_install_file a php function is called which issues a warning for the nonexistant file. file_exists() is used in previous code, but in a way which makes it senseless...
The attached file return immediatly false if the file isn't of the expected type or doesn't exist. This check is entirely performed by the is_xx()-func.
The old misbehauvior needed to subsequent calls to drupal_verify_install_file which are unneeded.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

I think we need to retain the $return and make the changes I have attached.

catch’s picture

Not tested the patch yet, but this is to prevent errors if you mv default.settings.php instead of cp default.settings.php since the installer requires both default.settings.php and settings.php to actually work.

CorniI’s picture

Nah, it's not the real patch, it's a bug I found when writing that patch ;)
The one of earnie doesn't work. I maybe have to explain better where the problem really lies: Even when a file doesn't exist drupal calls drupal_install_fix_file() for the file, which issues a call to fileperms() which then issues a stat failure:
Warning: fileperms() [function.fileperms]: stat failed for ./sites/default/default.settings.php in /var/www/drupal7/includes/install.inc on line 740
One may want to fix the problem there, too. But if a file is nonexistant most of the loop in drupal_verify_install_file is nonsense, too. The only logical thing (for me) would be passing a dir to the drupal_install_mkdir() and FILE_EXIST, the rest would just leed to failure-calls to is_xxx() and drupal_install_fix_file()

Anonymous’s picture

Status: Needs review » Needs work

So what you really need is to return FALSE if the file doesn't exist in drupal_install_fix_file.

CorniI’s picture

Status: Needs work » Needs review
FileSize
737 bytes

here we go...
I'll look at drupal_verify_install_file another day :)

Anonymous’s picture

Status: Needs review » Needs work

Watch those tabs. You need spaces.

CorniI’s picture

here we go again...

CorniI’s picture

Status: Needs work » Needs review

and I forgot to change the status

Anonymous’s picture

Status: Needs review » Reviewed & tested by the community
CorniI’s picture

I forgot a space, and added a comment by webchick's request. i'm not sure if she'll commit this as-is, but we'll see :D

catch’s picture

Status: Reviewed & tested by the community » Needs work

That one line comment is definitely over 76 characters long.

CorniI’s picture

Status: Needs work » Needs review
FileSize
810 bytes

That Comment wasn't good, anyway

CorniI’s picture

Status: Needs review » Fixed

webchick comitted this one, thanks!
Now just someone need to review #312144: Install fails when default.settings.php is not present ;)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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